PHP RuneScape stat function
Page 1 of 1
PHP RuneScape stat function
- Code:
<!-- This Script is from www.freecodescript.com, Coded by: Krishna Eydatoula, Mahmood Bina-->
function getStats($n) \{
$d = file_get_contents('http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1='.$n);
preg_match_all('/<td align=\'left\'>(.*?)<\/tr>/s',$d,$m);
$u = array('
','
');
$g = array('/^\s+/','/\s\{2,\}/');
$o = array('',' ');
$s = array();
foreach ($m\[1] as $v) \{
$ta = explode(' ',preg_replace($g,$o,str_replace($u,' ',strip_tags($v))));
$line .= $ta\[2];
$s\[$ta\[0]] = array('Rank' => $ta\[1],'Level' => $ta\[2],'Exp' => $ta\[3]);
\}
return (($s\['Overall']\['Level'] == 'does')? 'false':$s);
\}
<br><font face='Tahoma'><a target='_blank' href='http://www.freecodescript.com/'><span style='font-size: 8pt; text-decoration: none'>Free Code Script</span></a></font>
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum