• 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

Group rows by column and sum another column within groups [duplicate]

Autoloading classes in PHPUnit using Composer and autoload.php

Yii2 select2 database exception number of bound variables does not match number of tokens

get data-value with variable value

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

Apply filter array/return terms

Yii2: How do I debug console commands?

How to create a scheduler application in php

PHPExcel How to set conditional formatting to change cell background color based on cells values

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

How to test laravel controller method?

How to make a foreign key not using primary key

Ajax GET request fails in laravel 8

Hide specific products from unlogged users based in product category in WooCommerce

file_put_content...fail to open stream:Permission denied in Laravel 5

About Contact Privacy policy Terms and conditions