[GLLUG] [OT]PHP Coding Question
Brad Fears
brad@mtsdev.com
Mon, 7 Oct 2002 17:37:19 -0400 (EDT)
You could always include a header when you generate the vcf file that
forces to browser to prompt for download.
Just include these header lines in your generated text:
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=filename.vcf");
--Brad Fears
Mike Szumlinski said:
> I can't quite figure out how to do this...but right now I have a script
> that generates a vCard file, which is basically just a text file with a
> .vcf extension. I've unfortunately found that trying to link to this
> generated file makes the lines of text from the file appear in the
> browser rather than prompt for a download location or whatever (open
> with, save as...etc). I think it is something to do with the encoding,
> but I have no clue how to get around this. To give you an example of
> what I'm talking about, point your browser to
> http://britney.spartansummit.com/vcards/test.vcf and see what
> happens...I would rather this link prompt for download or open with,
> but I dunno how to do it server side. Thanks
>
> -Mike
>
>
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user