Anthony,

A web page that has embedded objects such as images is comprised of 
several different things entirely. Your method was to write the binary 
content that makes up an image in the same place as your HTML. So, you 
will see what looks like garbage, just as you would if you opened an 
image in a text editor.

You embed images in HTML simply by referencing them with the <img> tag. 
A web browser takes care of retrieving images via HTTP, so you don't 
have to worry about it. Just put this in your HTML:

<img 
src="http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jpg";>

Happy hacking.

Chris

Anthony Ritter wrote:

>The following script picks up single .jpg image of a doppler weather map
>from another URL:
>........................................
><?
>$theURL="http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
>g";
>if(!($fp=fopen($theURL, "r")))
> {
>  print("Could not open the URL.");
>  exit;
> }
>$contents=fread($fp,1000000);
>print($contents);
>fclose($fp);
>?>
>


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

Reply via email to