• 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

No result using makeStyles Material UI in react 18

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Use same method for inertia response and json response Laravel Jetstream

PHP: Convert any string to UTF-8 without knowing the original character set, or at least try

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

nginx err_connection_refused, can anyone help me?

ConstraintViolationListInterface to Exception in Symfony

Dynamic dropdown Ajax PHP request

Backend cannot be reached after Typo3 login screen

How to Install Composer Require doctrine/dbal

Open a popup box after receiving result from ajax

Laravel get user data with profile

Adding the custom page with add_menu_page function on Wordpress

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

MongoDB Duplicate Documents even after adding unique key

About Contact Privacy policy Terms and conditions