• 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 5.1 how to use {{ old('') }} helper on blade file for radio inputs

How to use React Router with Laravel?

Could not decode a text frame as UTF-8.

Log a user out of a website when they put their computer to sleep

PHP password_verify

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

Php - Sum up the numbers in an array one by one

Why is this PHP array not the same?

loop through an anchor id

Issue saving card for customer

How to check user Permissions using Custom Middleware in Laravel

WooCommerce Additional Information - if empty, hide

If you intend you use SMTP, add your SMTP Code after this Line

Create tags in laravel post publishing

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

About Contact Privacy policy Terms and conditions