how to pull stats

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
kippy
Forum Commoner
Posts: 84
Joined: Wed Jun 07, 2006 8:25 pm

how to pull stats

Post by kippy »

Just for curiosity, I was wanting to know how people pulls stats such as game scores and such from other sites to use on their own? Anyone have any clues as to how this is accomplished?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

A myriad of ways I imagine...

Easiest would be:

Code: Select all

file_get_contents('http://www.somedomain.com/score.html');
This would require extarcting the data manually...by parsing the HTML...

I believe this is what RSS was invented to cure... :)

The most important question you need to ask...is does the web site which your about to pull data from allow you to do so...

If your gonna pull stock quotes from a web site...your likely not allowed to do so

Anyways...

1) file_get_contents
2) cURL
3) RSS - If I am correct
4) SOAP & web services

Are just a few methods I can think of...
kippy
Forum Commoner
Posts: 84
Joined: Wed Jun 07, 2006 8:25 pm

Post by kippy »

Thanks,

I have a friend that wrote a program to display an office pool and it was pulling games off of another site, just wondered how he was able to do that. was just curious if it was possible to pull the information from a site or if it had to come from a database feed.

Thanks again for the insight!!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

just make sure you have permission to pull the information first.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

I second what Feyd just said...or is that third? :P
Post Reply