• 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

PHP-Sort array based on another array?

How do I set the maximum php memory limit

Send Outlook 2010 email using PHP

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

Reading input in php from terminal

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

Laravel 8 factory state afterCreating

Laravel phpunit test failing authorization

No result using makeStyles Material UI in react 18

PHP, how to convert Int value to Week days

How to add a custom field to all Woocommerce attribute terms using add_action

(Laravel) How to delete multiple models including optional relationships?

Remove categories with all childs derived from parent category

Return multiple values from a function using mysqli_fetch_assoc [closed]

Get orders by date and status woocommerce

About Contact Privacy policy Terms and conditions