Hi guys, I've added a download vcard option in my social networking system - however when I try to get it to download the vcard for some reason the vcard is downloaded as a raw file i.e. I need to rename it to be a vcf file in order to open as a vcard. I'm using the following code to send headers but for some reason its not working as it should:
header("Content-Disposition: attachment; filename=vcard-$filename".'.vcf');
header("Content-Length: ".strlen($output));
header("Connection: close");
header("Content-Type: text/x-vCard; name=vcard-$filename".'.vcf');
echo $output;
Despite that the file is downloaded without the extension .vcf and I have to manually add the extension - whats wrong here :( I'm using Zend Framework and I've disable using any view in the action which spills out the vcard for download...
==================================
Uh never mind I figured it out - the $filename value had a %20 in it - thanks anyway :">