rendered paste body;214 to 76 and 224 to 86
<?
$user1 = $_GET['user1'];
$user2 = $_GET['user2'];
if ((!$user1) | (!$user2)) {
echo 'Specify 2 users';
exit;
}
if (!$_GET['skill']) {
$skill = 'overall';
} else {
$skill = $_GET['skill'];
}
$compare = file('http://hiscore.runescape.com/compare.ws?user1='.$user1.'&user2='.$user2);
$x = 1;
while ($x <= count($compare)) {
if ((stristr($compare[$x],$skill)) AND (!stristr($compare[$x],$skill.'.ws')) AND (!stristr($compare[$x],'.gif'))) {
$choice = $x + 3;
$check = $x + 2;
if ((stristr($compare[75],"<i>\n")) AND (stristr($compare[85],"<i>\n"))) {
echo $user1 . ' and ' . $user2 . ' are not in the hi-scores for '.$skill.' END';
exit;
}
if (stristr($compare[75],"<i>\n")) {
echo $user1 . ' is not in the hi-scores for '.$skill.' END';
exit;
if (stristr($compare[85],"<i>\n")) {
echo $user2 . ' is not in the hi-scores for '.$skill.' END';
exit;
}
if ((stristr($compare[$check],'ranked')) AND (stristr($compare[$check+7],'ranked'))) {
echo $user1 . ' and ' . $user2 . ' are not in the hi-scores for '.$skill.' END';
exit;
}
if (stristr($compare[$check],'ranked')) {
echo $user1 . ' is not in the hi-scores for '.$skill. ' END';
exit;
}
if (stristr($compare[$check+7],'ranked')) {
echo $user2 . ' is not in the hi-scores for '.$skill.' END';
exit;
}
break;
}
$x++;
}
if (str_replace(",","",trim(strip_tags($compare[$choice+1]))) > str_replace(",","",trim(strip_tags($compare[$choice+11])))) {
$winner = '1';
$eval = str_replace(",","",trim(strip_tags($compare[$choice]))) - str_replace(",", "",trim(strip_tags($compare[$choice+10])));
$eval2 = str_replace(",","",trim(strip_tags($compare[$choice+1]))) - str_replace(",", "",trim(strip_tags($compare[$choice+11])));
}
if (str_replace(",","",trim(strip_tags($compare[$choice+1]))) < str_replace(",","",trim(strip_tags($compare[$choice+11])))) {
$winner = '0';
$eval = str_replace(",","",trim(strip_tags($compare[$choice+10]))) - str_replace(",","",trim(strip_tags($compare[$choice])));
$eval2 = str_replace(",","",trim(strip_tags($compare[$choice+11]))) - str_replace(",","",trim(strip_tags($compare[$choice+1])));
}
if (str_replace(",","",trim(strip_tags($compare[$choice]))) == str_replace(",","",trim(strip_tags($compare[$choice+11])))) {
$winner = '=';
$eval = 'same';
$eval2 = 'same';
}
echo trim(strip_tags($compare[$choice])) . ' ' . trim(strip_tags($compare[$choice+10])) . ' ' . $winner . ' ' . $eval . ' ' . $eval2 . ' END';
?>