• 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

Correct way to use LIKE '%{$var}%' with prepared statements?

I can't delete my image when it is liked because of the foreign key in mysql

how to fix Service provider class not found when using repository?

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Array to string conversion

Submitting a form with ajax in Wordpress

Move a child array to parent array and change parent/child name

MySQL order by field in Eloquent

Querying only one row from a one to many relationship laravel

How to create a scheduler application in php

Transform array, set each array element with parent key php

How to render html from a @foreach loop in a textarea

I cannot create a auto generated date time in mysql workbench

How to extract price from given url using Xpath?

send email using gmail-api and google-api-php-client

About Contact Privacy policy Terms and conditions