• 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

google content api for shopping

Detect a fetch request in PHP

Laravel websockets AWS EC2 - Connection failed

PHP: Insert marker every 3 iterations

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Laravel relationship belongsToMany with composite primary keys

How to test a php login connected to a mysql db through xampp?

Facebook PHP SDK - will not logout properly

selected value from the listbox in php

how to prevent float variables displaying as scientific notation when printing [duplicate]

Zig-zag scan an N x N array

301 Redirect to remove query string on homepage only

How to edit Records using CodeIgniter

Target Laravelista is not instantiable

PHP array_filter with arguments

About Contact Privacy policy Terms and conditions