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

Posted by Richard Lynch on 05/13/05 02:08

On Thu, May 12, 2005 11:54 am, Chris Bruce said:
> API. The problem is that the resulting image is being displayed as
> binary characters in the browser instead of downloading to my computer.

> Does anyone know how I can take the binary result and force it to
> download as a JPG image?

At a minimum, for current browsers, you need:
header("Content-type: image/jpeg");
before you send the JPEG out.

Actually, before you send *ANYTHING* out, but you'd break the JPEG sending
anything else out before that anyway.

If you want to support older browsers, on more platforms, you would do
well to look at another thread from yesterday where I talk about about
PATH_INFO.

--
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

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