IK heb wat zitten proberen om een skill signature te maken, maar ik zit vast
hij neemt altijd m'n totaal skill terwijl ik bv m'n prayer wil laten zien.
De skill prayer neemt hij wel maar de xp, rank of lvl niet daar neemt hij altijd de resultaten van m'n totaal.
<?php
putenv('GDFONTPATH=' . realpath('.'));
$imgname='baseimage.jpg';
$im = @imagecreatefromjpeg($imgname);
error_reporting(E_ALL);
function GetRSstats($username,&$result)
{
# Return: Boolean
# And an empty array in your second parameter on failure, or filled with the skills on success.
# Please note; no support is given.
/*
###
### Made By Chessspider ( www.chessspider.nl - 2007© )
###
### Please leave this notice here. If you really want to make me happy, also put a link to my runescape world switcher:
### http://worldswitcher.chessspider.nl/
### on your website.
*/
# You might have to update these some day...
$arrSkills = array(
"Prayer",
); // Skills... Order DOES matter, it should always be the same order as the highscores page.
$sDomain = "http://hiscore.runescape.com/"; // With trailing /
$sPage = "index_lite.ws?player="; // Page to request
# You shouldnt have to change anything from here
$arrLevels = @file($sDomain.$sPage.urlencode($username),FILE_IGNORE_NEW_LINES); // Obtaining scores, surpressing possible warnings
$result = Array();
if($arrLevels === false || empty($username) || strlen($username) > 15)
return false;
$iLength = count($arrSkills);
for($i = 0;$i < $iLength;$i++)
{
$levels = explode(",",$arrLevels[$i]);
$arrStats[$arrSkills[$i]]["skill"] = $arrSkills[$i];
$arrStats[$arrSkills[$i]]["rank"] = $levels[0];
$arrStats[$arrSkills[$i]]["level"] = $levels[1];
$arrStats[$arrSkills[$i]]["exp"] = $levels[2];
}
$result = $arrStats;
return true;
}
if(GetRSstats("slash350",$stats))
{
foreach($stats as $values)
$var = $values['skill'];
$var1 = $values['exp'];
$color = imagecolorallocate($im, 0, 0, 0);
$font = 'arial.ttf';
imagettftext($im, 9, 9, 77, 28, $color, $font, $var);
imagettftext($im, 9, 9, 129, 54, $color, $font, $var1);
header('Content-Type: image/jpeg');
imagejpeg($im);
imagedestroy($img);
}
else
{
echo "Username does not exist";
}
?>
Kan er iemand helpen ? alvast bedankt.
2.304 views