Web Question.

Miscellaneous Forums/General Discussion/Web Question.

I can't get into -why- I need to be able to do this. But. Lets say I wanted to pull, for example, a wikipedia article off the web with PHP or however need be, then parse that article. What I need to do is grab the text (or at least the whole file) and put that in a variable.

Other things that would be nice? Being able to do this to any site, not just Wiki. SO lets steer clear of some service that Wikipedia offers if there is one. But I'd like to know of one if it exists.


Basicly. I want to know the best way to get my server to read a webpage and to then do something with it. Like I said. I can't go into why.

I'm looking for the -best- ways to do it. I know of at least one, but it seems bulky and wasteful. My hope is there is an easier way. But I can't go into any more detail than that. Sorry.

Thanks in advance.


EDIT

Nothing illegal. I am just not allowed to talk about it.

http://www.google.co.uk/search?q=php+get+remote+web+page+content&ie=utf-8&oe=utf-8&rls=org.mozilla:en-GB:official&client=firefox-a

Second link on that seach gives me the way I was thinking. Does anyone know of a better way? Faster way?

Second link on that seach gives me the way I was thinking. Does anyone know of a better way? Faster way?

You want a faster way than opening the file on the remote server and reading the contents?

You could ask them if they would ftp the files to your server at the same time as their's, otherwise, I think you're out of luck. :)

Well. I am open to interesting options. Like caching them, or something creative. It is imperitive that this be as fast as possible.

It can't hurt to ask, you know? Maybe someone knows something I don't?

That's the first hurdle. Now I need to figure out how to parse something as messy as a wiki-article. Oh. I thought of a great example of what I need to do.

Lets say I check on wiki for... Aerosmith. and also do the same on ... Mp3.com.

What I need to do is a lot like trying to parse both of those sites (wiki and mp3.com) and drawing lines between them, and then producing meaningful content from it... I guess.. In that example it would be lists of albums and songs, the history of the band and links to the songs on mp3.com or something... I don't know. That is actually a lot harder than what I need to do.