• 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

Google Calendar API batch request PHP

Artisan, creating tables in database

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

PHP using str_starts_with for array to exclude same as with wildcard

Laravel PHP: multiple project run at the same time [closed]

Prestashop webservice API creating cart rules

Reducing authentication calls on external API (Laravel 5.6)

Can't find vendor/autoload.php for Ratchet

PHP contact form configuration [duplicate]

Can we define variables in `.tpl` files?

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

PHP sort array of objects by two properties

Is there a way to use Foundry Model for Authentification inside Functional Tests?

How to test a php login connected to a mysql db through xampp?

About Contact Privacy policy Terms and conditions