• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Mobile browsers are adding .html to filename on download

phpfilemobilefile-extensionvcf-vcard


PHP Snippet 1:

header('Content-Description: Download vCard');
header('Content-Type: text/vcard');
header('Content-Disposition: attachment; filename='.$your_filename_here);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
ob_clean();
flush();
echo $vcard_serialized; //echo the content
exit;

Related Snippets

Getting public posts of a random user from Facebook API

Whats the point of running Laravel with the command 'php artisan serve'?

PHP error: "The zip extension and unzip command are both missing, skipping."

Laravel - How to properly generate unique slugs from article titles?

SlimExceptionHttpNotFoundException

Dynamic dropdown Ajax PHP request

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

Increase value by 1 on button click

Laravel 8 Multiple Relationships for Factory

Clients authentication and user authentication with laravel

How to send parameters in soap request in php in __soapcall() function

PHP array slice from position + attempt to return fixed number of items

Sum array values of a column within each column of an array with 3 levels

Xdebug in Laravel is not working with VSCode

Post Form Data To phpmyadmin Database

About Contact Privacy policy Terms and conditions