• 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

Where do I need to place a hook for phpunit?

getting error while enter Command => php artisan route:list

Laravel set default language not working

Sort multidimensional array by column value within a column

How to display table header in every page using FPDF library?

disable two buttons after clicking another button

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Transpose and flatten multiple rows of array data [duplicate]

Prestashop cUrl Login

Timber: Single post pagination does not work (wp_link_pages)

Post Form Data To phpmyadmin Database

Ajax GET request fails in laravel 8

Display a success custom notice after Placing an Order in WooCommerce

I want to display a sweetalert after the inserting of data in my database

How to access a var with "-" in PHP [duplicate]

About Contact Privacy policy Terms and conditions