Re: Reading remote image into a file and displaying..

From: Date: Thu, 20 Feb 2003 19:52:09 +0000
Subject: Re: Reading remote image into a file and displaying..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136406@lists.php.net to get a copy of this message
More specifically (since I just dealt with this issue myself), use fpassthru (and be sure not to fclose the file pointer as it's automatically done by fpassthru) On 02/20/03 12:47 PM, "Mincu Alexandru" <alex@intelinet.ro> wrote: > use header("Content-type: image/jpeg"); and then you can echo it's > content. > On Thu, 2003-02-20 at 17:30, Chad Day wrote: >> I'm trying to get weather channel information without using their form to >> submit the zip code .. the url format is : >> >> >> http://oap.weather.com/fcgi-bin/oap/generate_magnet?loc_id=$ZIP&code=689861& >> destination=$ZIP >> >> so I tried: >> >> $weatherfile = >> >> readfile("http://oap.weather.com/fcgi-bin/oap/generate_magnet?loc_id=$_SESSI >> ON[ZIP]&code=689861&destination=$_SESSION[ZIP]"); >> echo $weatherfile; >> >> but of course it just outputs the raw image data .. I tried echoing it out >> in a img src tag, same result. Is there some function I'm unaware of that >> will help me out here? >> >> Thanks, >> Chad -m^2 __________ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! __________

« previous php.general (#136406) next »