Hey there, I've been trying to use some html from a weather page here: and display it on my own page that I can access from a mobile device. I've looked at a couple of different methods, and I was wondering what would be the best. I don't want to take the whole document, just the headlines (e.g. Tonight : Mostly Cloudy and Colder.)
I was thinking of opening the page, and using fread() with a big enough buffer. And then searching for the correct tags. The problem that I'm having trouble with is whether or not a subsequent search can be started from where I left off. The html tags are pretty much the same, and I want to get the next instance of it.
I'm planning on opening it with something like this:
fopen ("http://mobile.wunderground.com/cgi-bin/findweather/getForecast?query=20815", "r");
and I'm currently debating whether to use preg_match, strstr or substr to get what I need.
Also, is there a way to put the code into an array and just search by which line of code it is?
Thanks, I appreciate any help.