• 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 trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

The sum of the user's points

PHP/HTML: Creating A SubMenu

How to get multiple values with same key from an array PHP

advanced custom fields wordpress custom class

How to fix bootstrap multiselect search data using ajax

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

MySQL upgrade causing unexpected results on simple WHERE clauses

Add and update products to session cart in Laravel

Cache clear probem in Larave

Check for PDO Results, If None Display Message, If Yes then Loop Through

Get all WooCommerce products within own plugin

calling server using nusoap with complextype

Limit login attempts in Laravel 5.7

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

About Contact Privacy policy Terms and conditions