I'm making a clan website that I'd like to dynamically update from runescape's website to keep our clan data up to date. I'm planning on making a PHP script which I can execute daily via cron job that does 3 things:
So far:
file_get_contents('http://services.runescape.com/m=clan-home/clan/Quest%20Cape%20FTW');
#Clanstat_1 .clanstatVal
to #Clanstat_5 .clanstatVal
)$var1
, $var2
, etc.Can anyone help with step 2?
You can use any great HTML Parser written in PHP.
Personally, I like this one - PHP Simple HTML DOM Parser: http://simplehtmldom.sourceforge.net/
You can then access any element of your HTML using jQuery-like syntax.