• 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

Override default Auth routes in Laravel 7

I want to display a sweetalert after the inserting of data in my database

Error converting docx to pdf using Unoconv

Filter WooCommerce products with post__in and additional meta queries

Timber: Single post pagination does not work (wp_link_pages)

How to disable widget block editor of WordPress?

how to identify the web server name of remote host

Statement that checks whether a URL contains a particular path?

How to fix bootstrap multiselect search data using ajax

CodeIgniter 3 is generating a session file on each request, why?

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Populate Dynamic Dropdowns List in Codeigniter

php curl requesting twice

Add and update products to session cart in Laravel

Form Validation and Submission to database

About Contact Privacy policy Terms and conditions