• 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

Nginx RTMP not recording

Add restriction to WooCommerce coupons by allowed user ID

How to use PHPCBF to fix one issue at a time?

How to create laravel storage symbolic link for production or sub domain system?

backup files to google drive using PHP

Implode columnar values between two arrays into a flat array of concatenated strings

Check if my GET request has Header: Token

Limit login attempts in Laravel 5.7

Laravel phpunit test failing authorization

Laravel Mix Uncaught ReferenceError: $ is not defined

SQL AVG() to 2 decimals

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

Problem with fetching data from database in Laravel

Form repeater send wrong data with last element in Laravel

About Contact Privacy policy Terms and conditions