Re: [PHP] file reading and regex

2003-06-04 Thread Michael Allan
Marek, Your pattern should look like: $pattern = "([[:digit:]]{6}0425\.jpg)"; BINGO! This will give you the image name, but remember that ereg works on single lines and also the image might be taken at some time around 4:25. So you need a while loop to read the html line by line, in the loop t

Re: [PHP] file reading and regex

2003-06-04 Thread Marek Kilimajer
Your pattern should look like: $pattern = "([[:digit:]]{6}0425\.jpg)"; This will give you the image name, but remember that ereg works on single lines and also the image might be taken at some time around 4:25. So you need a while loop to read the html line by line, in the loop try to match the

RE: [PHP] file reading and regex

2003-06-04 Thread Jay Blanchard
[snip] http://rsd.gsfc.nasa.gov/goesg/earth/Weather/GMS-5/jpg/vis/4km/";; if (!($fp = fopen($URLbase, "r"))) { echo "Could not open the url"; exit; } $contents = fread($fp, 100); fclose($fp); ?> [/snip] Was that r

[PHP] file reading and regex

2003-06-04 Thread Michael Allan
New to the list, so I hope I'm in the right place. I'm trying to write a small php function which checks a page filled with a list of satellite images of earth, and loads the latest one to have been taken at 4:25 in the morning, when the view is most complete (full credit to be given to the ori