• 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

Too few arguments to function PendingResourceRegistration::name(),1 passed in C:xampphtdocsproject outesweb.php on line 18 and exactly 2 expected

Wordpress add responsive srcset header image to theme

Group data in a multidimensional array based on two columns

How to Create WooCommerce Subscription Product via. REST API?

Add Class in html Dynamically in PHP

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

PHP function Not Working As Expected From functions.php Include File

Access relation of pivot table in Laravel

Pages are working fine on localhost but not running on the hosting server

PHP Deprecated issue when running artisan command

phpseclib 2.0 can not use Composer to create autoload

how to use extended ASCII instead of unicode in PHP

curl returning 301 error after migrating to https

Get all WooCommerce products within own plugin

Cant seem to get the Pagination to work on my WooCommerce REST API application?

About Contact Privacy policy Terms and conditions