Reading remote image into a file and displaying..
| From: | Chad Day | Date: | Thu, 20 Feb 2003 15:30:43 +0000 |
| Subject: | Reading remote image into a file and displaying.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-136378@lists.php.net to get a copy of this message | ||
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