how to pull stats
Moderator: General Moderators
how to pull stats
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
A myriad of ways I imagine...
Easiest would be:
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...
Easiest would be:
Code: Select all
file_get_contents('http://www.somedomain.com/score.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...
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!!
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!!
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg