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.
Hij wil ALLE gegevens inlezen, alle ranks. Pak het origineel er nog eens bij, en zet die array met skills terug zoals die was. Dan leest die de gegevens in elk geval weer goed in.

Je kan dan wel bijvoorbeeld van regel 66 t/m regel 72 maken:

<?php
if($var == 'Prayer'){
$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);
}
?>

Als ik het namelijk goed begrijp, maakt het script normaal gesproken een lijst met voor elke skill een afbeelding. Je geeft op deze manier aan dat die hier alleen de prayer moet hebben.
Met deze aanpassing krijg ik de melding :
Notice: Undefined variable: var in /home/rsinfo/public_html/slash350/index.php on line 87
Dat is knap, want ik tel in je scriptje maar 78 regels:

<?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...

#VUL DEZE ARRAY COMPLEET IN MET ALLE STATS
$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'];

if($var == 'Prayer'){
$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";
}
?>
Ik moest alle ranks erterug bijzetten daardoor kom ik aan meer regels , foutmelding is weg maar hij haalt nu geen gegevens meer of hij toont toch de gegevens niet meer.

<?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(
"Total",
"Attack",
"Defence",
"Strength",
"Hitpoints",
"Ranged",
"Prayer",
"Magic",
"Cooking",
"Woodcutting",
"Fletching",
"Fishing",
"Firemaking",
"Crafting",
"Smithing",
"Mining",
"Herblore",
"Agility",
"Thieving",
"Slayer",
"Farming",
"Runecraft",
"Hunter",
"Construction",
"Summoning"
,

); // 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'];
if($var == 'Prayer'){
$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";
}
?>

je kan toch wel een runescape stats signate maken met Photoshop cs.
of wil je net als dat van www.leetscape.com ?
Hans;
De TS wil die sig automatisch laten maken door PHP. Dat kan niet met Photoshop CS.
Douwe M schreef op 13.09.2008 10:40
Hans;
De TS wil die sig automatisch laten maken door PHP. Dat kan niet met Photoshop CS.

Dat weet ik wel. maar wil hij nou gewoon 'runescape signature' of dat het automatisch word gemaakt?

Dan is het wel moeilijk om automatisch Signature te maken.?
hans schreef op 13.09.2008 10:35
je kan toch wel een runescape stats signate maken met Photoshop cs.
of wil je net als dat van www.leetscape.com ?

Dat van leetscape doet het anders toch ook niet zo goed?



edit
Nu werkt het wel lol
er zijn ook goal levels daar ect.

Reageren