• 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

laravel MVC execution flow

WooCommerce: Add/display Product or Variation custom field everywhere

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

Lumen - Postgresql setup - Composer

Match csv filenames to table names and import

Xdebug in Laravel is not working with VSCode

SilverStripe unable to populate multiple member Childs

generating a random code in php?

generate an Excel file using PHP

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

Clients authentication and user authentication with laravel

hidden INPUT value not available in $_POST

MOODLE: What does it mean to aggregate h5p assets?

CodeIgniter extend CI_URI undefined method

About Contact Privacy policy Terms and conditions