$handle = fopen("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=".$_GET['user'],"r"); if($handle){ while (!feof($handle)) { $contents .= fread($handle, 8192);} fclose($handle);} function GetRank($skill) //Parse Functions { $str1 = strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<'); if(strpos($str1, 'd co')<30) return ''; $pos1 = strpos($str1, 't"')+3; return substr($str1, $pos1, strpos($str1,'<',$pos1)-$pos1);} function GetLvl($skill) //Parse Functions { $str1 = strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<'); if(strpos($str1, 'd co')<30) return '--'; $pos1 = strpos($str1, 't"',strpos($str1, 't"')+1)+3; return substr($str1, $pos1, strpos($str1,'<',$pos1)-$pos1);} function GetXP($skill) //Parse Functions { $str1 = strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<'); if(strpos($str1, 'd co')<30) return ''; $pos1 = strpos($str1, 't"',strpos($str1, 't"',strpos($str1, 't"')+1)+1)+3; return substr($str1, $pos1, strpos($str1,'<',$pos1)-$pos1);} function parserank($skill){return GetRank($skill);} // Retrival Functions function parselvl($skill){return GetLvl($skill);} // Retrival Functions function parsexp($skill){return GetXP($skill);} // Retrival Functions $cblevelraw = ("0.32707" * parselvl(Attack)) + ("0.249" * parselvl(Defence)) + ("0.324" * parselvl(Strength)) + ("0.25" * parselvl(Hitpoints)) + ("0.124" * parselvl(Prayer)); $cblevel = explode(".",$cblevelraw);