Re: cURL functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux