• 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

Access relation of pivot table in Laravel

Laravel lang slug in url

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

PHP mail function is sending blank message body

Laravel set default language not working

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

Warning: A non-numeric value encountered

Laravel after login Two factor not working

PHP: Telegram Bot: Insert line break to text message

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Required field only if another field has a value, must be empty otherwise

best way to store error messages in Laravel (session or variable)

How to remove from a multidimensional array all duplicate elements including the original?

Why isn't my PHP exception working?

Check if string contains a value in array [duplicate]

About Contact Privacy policy Terms and conditions