• 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 get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

How to convert binary string to normal string in php

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

Display a success custom notice after Placing an Order in WooCommerce

SQL AVG() to 2 decimals

How to get monthly wise data in laravel

Reading input in php from terminal

Laravel 8 factory state afterCreating

Too few arguments to function PendingResourceRegistration::name(),1 passed in C:xampphtdocsproject outesweb.php on line 18 and exactly 2 expected

Woocommerce redirect after add-to-cart error

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

Nginx disallowing execution of PHP in uploads directory with Magento

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

How can I get a div content in php

Laravel eloquent update record without loading from database

About Contact Privacy policy Terms and conditions