Hi Kamron3,
For getting page data, look into cURL. file_get_contents() is far too slow for a page of that size. The best thing about cURL is that it allows you to make parallel data fetches, so you should be able to get the contents of 50 grand exchanges in under a minute -
http://php.net/manual/en/function.curl-multi-exec.php . Getting a single page with cURL using curl_exec() (
http://www.php.net/manual/en/function.curl-exec.php) is also probably faster than file_get_contents().
cURL however does have some odd tendencies you might run into - it's not always successful, so you sometimes have to validate the data it fetches to make sure it worked (and trigger it to loop back through if it didn't), and if you use curl_multi_exec(), there's a limit to how many parallel fetches you can make at once - usually 50. However, it's really the best option out there at the moment for fetching pages. RuneTrack's system update actually uses cURL, and captures roughly 7,000 (one for each user) stat pages each night in a matter of minutes.
Unfortunately though, unless Jagex has released something I'm not aware of, they don't have a raw page for Grand Exchange data like they do for highscores data (
http://hiscore.runescape.com/index_lite ... ord_kill11), which will drastically complicate the process.
The idea way to get the exact numbers you want out of the data would be preg_match (
http://php.net/manual/en/function.preg-match.php), though if that doesn't work out, just use strpos (
http://us3.php.net/manual/en/function.strpos.php) to get the position of some unique tag/identifier directly before and after the number you want to extract. Then, using those two position values, substr() the specific number you want.
You may also want to take a look at
http://www.grandexchangecentral.com/ - it's essentially a tracker site for the Grand Exchange.
Hope that helps.
