• 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

Clear javascript source cache laravel 5.8

Problems getting instance of UploadedFile in Yii2

Laravel Schedule not sending email

Hide email address with stars (*)

how to retrieve the first and last instance of a row in pdo dataset

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Yii2: How do I debug console commands?

LARAVEL: How to fetch id dynamically in a query builder?

Adding the custom page with add_menu_page function on Wordpress

PHP Slim Framework request using withAttribute error

jQuery Ajax Post with data

Laravel Passport - Not able to get token string in response?

Laravel eloquent update record without loading from database

How to add automatically collapse/expand in content wordpress (single.php)?

About Contact Privacy policy Terms and conditions