• 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

How to keep value of selected value after form submission?

Laravel post contact form giving me error 419

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

how to loop through json response data using ajax jquery?

MySQL upgrade causing unexpected results on simple WHERE clauses

Array to string conversion

How can I get data from PHP to Android TextView?

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

Explain how this array transposing and flattening function works

Reading input in php from terminal

Handling expired token in Laravel

Cache clear probem in Larave

yii2 and mssql insert varbinary into model

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

About Contact Privacy policy Terms and conditions