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