• 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

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

php curl requesting twice

Insert database rows from columns of data from associative array of indexed arrays

Required field only if another field has a value, must be empty otherwise

Laravel multi auth - Authentication user provider [] is not defined

PHP: How to raise number to (tiny) fractional exponent?

Upgrade PHP on AWS Linux

PHP to search within txt file and echo the whole line

Laravel Collections. Is there some kind of assertStructure method?

Laravel php artisan serve to mimic HTTPS

Convert PHP array into HTML tag attributes separated by spaces

Lumen - Postgresql setup - Composer

PHP, how to convert Int value to Week days

Insert a DIV after the 6th product only once in WooCommerce category archives

Limit WooCommerce products in cart only from one custom taxonomy

About Contact Privacy policy Terms and conditions