Extracting data from a html string...
Posted: Wed Feb 15, 2006 5:54 am
Hello. I have just read through the helpful tutorial, but am still a little unsure...
If i extract some HTML to a string, i can match what im looking for using something like this:
Which is fine.
The problem I have, is that if that value of 13.1 is constantly changing say every 30 minutes, how do find it in the haze of html code and extract that new value each time? I'm assuming that its position on the page doesnt change, simply the value.
Thanks in advance
If i extract some HTML to a string, i can match what im looking for using something like this:
Code: Select all
page = file_get_contents("http://www.somesite...");
if (preg_match("/13.1/", $page))
{
print ("yes");
} else {
print ("no");
}The problem I have, is that if that value of 13.1 is constantly changing say every 30 minutes, how do find it in the haze of html code and extract that new value each time? I'm assuming that its position on the page doesnt change, simply the value.
Thanks in advance