• 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

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Display the WooCommerce product price inside a custom function

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

Facebook API, get page post link (PHP)

how do i retrieve and display the alt text of an image in wordpress?

How do I refresh a DIV content?

how to make my own auto increment in php?

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

Create tags in laravel post publishing

Get data from accuweather api url

Is it possible to change the table name in the migration file-laravel

PHP: Convert any string to UTF-8 without knowing the original character set, or at least try

php - add comma thousands separator but remove trailing zeros

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

PHP: remove filename from path

About Contact Privacy policy Terms and conditions