• 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

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

How do I loop through an MS SQL database with VB.NET?

How to loop a tree array with unknown depth and get array blocks?

MySQL upgrade causing unexpected results on simple WHERE clauses

Image upload not working through ajax Laravel

disable two buttons after clicking another button

PHP Discord OAUTH2 code sample not working

php echo xml documents with header

printing all running session variable in laravel 5.1

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

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

Mysqli Output to a table

MongoDB Duplicate Documents even after adding unique key

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

Error converting docx to pdf using Unoconv

About Contact Privacy policy Terms and conditions