• 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

Laravel set default language not working

Dynamic dropdown Ajax PHP request

how to get the header value, if we don't know the value because the value is random from the server

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

how to remove white space in select 2

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

GRPC installed successfully on ubuntu but php is looking for it in another folder

Adding the custom page with add_menu_page function on Wordpress

Error Class "LaravelFortifyFeatures" not found

Add 2 Webcam in one page with WebcamJS

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

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

shell errors running php exec

Merge key and value of array index [duplicate]

How to update array value in Laravel

About Contact Privacy policy Terms and conditions