Hello!
I have a question regarding fetching a website. I want to have a few rows of text from a website (weather) thats always start with "ESNO" and ends with a "=" sign.
A use the snippet of code below. It takes the whole website and put it in a array. But i dont know how to take only a specified row out of the array and present it on my webpage!
So, if the whole array contains:
ESMX 041730Z 041822 VRB03KT 8000 BR BKN015 TEMPO 1822 2500 BR -RA BKN003 BECMG 1921 03012KT=
ESNN 041730Z 041802 20004KT 9999 -RA SCT020 BKN020 PROB30 TEMPO 1824 -RASN BKN010=
ESNO 041730Z 041823 03005KT 9999 -RASN SCT020 BKN050 PROB30 TEMPO 1823 1400 SN BKN002=
ESNQ 041730Z 41823 02006KT 9999 SCT020 PROB30 TEMPO 2123 4000 -SNSN BKN010=
and i only want the info between "ESNO" and the "=" sign, what schould I do?
Many thanks if you can help me!
Hope you can understand my poor english!
// Mattias
The code snippet i use:
<?
$GrabURL = "http://www.notmywebsite.con";
$GrabStart = "ESNO";
$GrabEnd = "=";
$file = fopen("$GrabURL", "r");
$rf = fread($file, 20000);
eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
echo $printing[1];
fclose($file);
?>