• 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

Open a popup box after receiving result from ajax

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

How to change product Image when variables are selected in Shop and Archive Pages?

How to override htaccees file for cache control header

Php - Sum up the numbers in an array one by one

Reload parent page after submit in iframe

Which is faster php date functions or carbon?

Laravel: Create morphs() relationship nullable

PHP - installing Xdebug on Mac with XAMPP (Unix File)

Wordpress wpdb->delete issue

Laravel 5 controller sending JSON integer as string

How can I get new CSRF token in LARAVEL by using ajax

PHP contact form configuration [duplicate]

How to delete old images from public folder on update using Laravel

wordpress : How to specify the cause "This site can’t be reached"

About Contact Privacy policy Terms and conditions