• 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

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

how to get value from array in laravel

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

I want to display default profile image if user do not have profile image

Class AppHttpControllersUserController Does Not Exist

Dynamic dropdown Ajax PHP request

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

merge all files in directory to one text file

Mysqli multi query error

SQL AVG() to 2 decimals

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

How to get AJAX to post on second page?

Redirect to previous page with php

How to create custom authentication in laravel 8?

How can I access an array/object?

About Contact Privacy policy Terms and conditions