You are here: Re: [PHP] cURL functions « PHP « IT news, forums, messages
Re: [PHP] cURL functions

Posted by Richard Lynch on 05/14/05 06:16

On Fri, May 13, 2005 3:45 pm, Chris Bruce said:
>> header("Content-type: image/jpg");
>> Header('Content-Disposition: attachment;
>> file="tigershippingdashboard20050429.jpg"');
>> echo $ret;
>
> Did you try this Jason? When I try it, it just downloads the
> getimage.php file with the binary content of the image in the file.

Content-Disposition only works on some browsers.

The ONLY way to get EVERY browser to behave is to make your URL end in
tigershippingdashboard20050429.jpg -- and ideally to not have any other
extension (.php or .htm or .html or .shtml or ...) in the URL and also, if
you want it to work for various other multi-media (PDF, SWF, etc) you
might as well set up to use $_SERVER['PATH_INFO'] instead of $_GET

Whew. That was my rant boiled down to one run-on sentence. :-)
HOW to do all that is in the archives with my name and PATH_INFO on it
most recently, though I really just stole all the bits and pieces from
everybody else.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация