• 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

Last order would be re-order in wooCommerce. How is it possible?

if statement inside concatenation

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

OAuth2 Token PHP

file_put_content...fail to open stream:Permission denied in Laravel 5

woocommerce change position of price

hidden INPUT value not available in $_POST

cakephp save drag and drop list order to database

How to give apache permission to write to home directory?

Display specific shipping method if woocommerce product has specific acf field value

PHP file_get_contents function

xdebug 3 not working in ubuntu 20.04 with docker

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

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

How to make a array inside array?

About Contact Privacy policy Terms and conditions