• 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

Having issue with matching rows in the database using PDO

file_get_contents() without "Http" to access external URL [closed]

Laravel Get Days In Month From Month Number?

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

oauth-private.key does not exist or is not readable

Laravel 5.5 change unauthenticated login redirect url

How to check user Permissions using Custom Middleware in Laravel

I'm trying to use curl with php but getting this error:Could not resolve host: Bearer

How can I get new CSRF token in LARAVEL by using ajax

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Unable to match results of php hash_hmac() and coldfusion hmac()

wordpress : How to specify the cause "This site can’t be reached"

Upgrade PHP on AWS Linux

Reload parent page after submit in iframe

How to create laravel storage symbolic link for production or sub domain system?

About Contact Privacy policy Terms and conditions