• 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

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

Laravel Command Schedule Not Working Properly

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

How to check user Permissions using Custom Middleware in Laravel

Debugging Stripe Webhook Event

How do I Post to .txt document before form submits

Google Gmail API - How to login programatically?

Add Class in html Dynamically in PHP

Handling expired token in Laravel

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

Results page in other window

PHP web3 ERC20 token function call

Toggle between a textbox and a select using PHP

How to test a php login connected to a mysql db through xampp?

About Contact Privacy policy Terms and conditions