Create a spider/bot class using PHP to fetch the schedules and scores from [url removed, login to view] then save them to a database.
1. Create a user interface where the admin will choose a league and the spider will fetch the game schedules for the entire season. If the game has been played already, then the spider will update that game record with the correct score.
g_id int(11) auto_increment
2. All fetching must be done through a proxy server. UI will allow the admin to select which proxy server to use before fetching.
p_id int(11) auto_increment
3. Yahoo score pages are fairly consistent in the HTML layout. All leagues will use functions from a same php class to parse the HTML. The 5 pages are as follows:
NBA - [url removed, login to view] NFL - [url removed, login to view]
NHL - [url removed, login to view]
NCAA FOOTBALL - [url removed, login to view]
NCAA BASKETBALL - [url removed, login to view]
I have enclosed a script that performs the task for NHL. Use it only to have an idea of the results I want (THIS SCRIPT FETCHES FROM THE NHL OFFICIAL SITE NOT YAHOO, THIS SCRIPT DOES NOT USE REUSABLE CLASS, USE ONLY AS HELPER)
I expect the following files:
1. [url removed, login to view] - a form where the user selects the league (NBA, NFL, NHL, NCAA FOOTBALL, NCAA BASKETBALL) and optional date (by default, spider will fetch entire season)
2. [url removed, login to view] - a class with reusable code for all sports pages to use. Will include different functions for parsing scores and schedules (e.g. by regular expressions, by fixed length, by start and end string, etc...)
3. [url removed, login to view] - a page that opens the respective pages (e.g. [url removed, login to view]),calls the parsing functions and stores schedules and/or results in the database.
LINUX, PHP, MYSQL