Marty Posted July 20, 2009 Share Posted July 20, 2009 I made this for the PC Site like 2 weeks ago, since the project I guess is dead now, I'm going to release everything I made. Example: http://rspserver.com/marty/statsigs/ You can Download it as a .zip or copy & paste the code below. & yes the images are very simple, I'm not very good at graphics so I didn't even try, you can make your own if you want to use it. $x = array('27', '79', '134', '187', '239'); $y = array('9', '30', '53', '78', '101'); Those are the coordinates for where the levels will be displayed, so that you can make it fit in with your custom images. index.php <?/** Runescape Hiscore Lookup* By Marty(K L E O S)* www.epidemicclan.com*/$url = "http://rspserver.com/marty/statsigs/";?><form method="POST"><input type="textbox" name="username" value="K L E O S"><input type="submit" name="submit" value="Go"><br /><input type="radio" name="image" value="image1">Image 1<br /><input type="radio" name="image" value="image2">Image 2</form><?if(isset($_POST['submit'])){ $sr = $_POST['image']; $username = $_POST['username']; $username = str_replace(' ', '_', $username); if($sr == "image1") { echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=1"><br>'); echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=1]"><br>'); echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=1"><br>'); } else if($sr == "image2") { echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=2"><br>'); echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=2]"><br>'); echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=2"><br>'); } else { echo('<b><font color="red">You did not choose an image, so one was selected for you.</font></b><br /><br />'); echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=1"><br>'); echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=1]"><br>'); echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=1"><br>'); }}?> sig.php <?php/** Runescape Hiscore Lookup* By Marty(K L E O S)* www.epidemicclan.com*/$username = $_GET['username'];$type = $_GET['type'];//$username = strtolower(str_replace(' ', '_', $username));if(!$username) {$username = "K L E O S";}$index = @file_get_contents('http://hiscore.runescape.com/index_lite.ws?player=' . $username);if ($index != "") { $lulwut = explode("\n", $index); $overall = explode(",", $lulwut[0]); $lol['att'] = explode(",", $lulwut[1]); $lol['def'] = explode(",", $lulwut[2]); $lol['str'] = explode(",", $lulwut[3]); $lol['hp'] = explode(",", $lulwut[4]); $lol['rng'] = explode(",", $lulwut[5]); $lol['pry'] = explode(",", $lulwut[6]); $lol['mag'] = explode(",", $lulwut[7]); $lol['ck'] = explode(",", $lulwut[8]); $lol['wc'] = explode(",", $lulwut[9]); $lol['flt'] = explode(",", $lulwut[10]); $lol['fsh'] = explode(",", $lulwut[11]); $lol['fm'] = explode(",", $lulwut[12]); $lol['cra'] = explode(",", $lulwut[13]); $lol['smi'] = explode(",", $lulwut[14]); $lol['min'] = explode(",", $lulwut[15]); $lol['her'] = explode(",", $lulwut[16]); $lol['ag'] = explode(",", $lulwut[17]); $lol['th'] = explode(",", $lulwut[18]); $lol['sl'] = explode(",", $lulwut[19]); $lol['frm'] = explode(",", $lulwut[20]); $lol['rc'] = explode(",", $lulwut[21]); $lol['hun'] = explode(",", $lulwut[22]); $lol['cs'] = explode(",", $lulwut[23]); $lol['sum'] = explode(",", $lulwut[24]); if($type == 1) { $image_URL = 'image.png'; } if($type == 2) { $image_URL = 'image2.png'; } else { $image_URL = 'image.png'; } $image = imagecreatefrompng($image_URL); $fcolour = imagecolorallocate($image, 255, 255, 255); $fsize = 5; $x = array('27', '79', '134', '187', '239'); $y = array('9', '30', '53', '78', '101'); $row = '0'; $column = '0'; foreach($lol as $s_key => $value){ $value[1] = str_replace('-1', '1', $value[1]); imagestring($image, $fsize, $x[$row], $y[$column], $value[1], $fcolour); $row++; if($row == '5'){ $row = '0'; $column++; } } $overall[1] = str_replace('-1', '1', $overall[1]); imagestring($image, $fsize, '230', '100', 'Overall:' . $overall[1], $fcolour); $username = str_replace('_', ' ', $username); imagestring($image, $fsize, '240', '115', '' . $username, $fcolour); header('Content-type: image/png'); imagepng($image); imagedestroy($image);} else { echo("You have entered an invalid username or the username was not found on the hiscores.");}?> 2 images: Link to comment Share on other sites More sharing options...
Mavric Posted July 20, 2009 Share Posted July 20, 2009 Own. Signature removed Link to comment Share on other sites More sharing options...
Coz Posted July 20, 2009 Share Posted July 20, 2009 O yeah, we are working on this as I respond to this. Lets see if Karl sees this { Elder of The Last Pures } { Christ lived the life I should, and died the death I deserve. } { Proud Moderator Of PW } Link to comment Share on other sites More sharing options...
XX R Cbow XX Posted July 20, 2009 Share Posted July 20, 2009 whats it supposed to look like? Link to comment Share on other sites More sharing options...
+Karl Posted July 20, 2009 Share Posted July 20, 2009 This is currently how PW's is coded. I'm going to make it more customisable though. IRC Nick - ``Karl "You lost me at biased."Need help? PM me Link to comment Share on other sites More sharing options...
`JvYv Posted July 21, 2009 Share Posted July 21, 2009 Hmmm Got A Problem/Question E-mail Me At [email protected]Yuila ♥Editing Video's + Caping Pm Me Link to comment Share on other sites More sharing options...
Luke- Posted July 21, 2009 Share Posted July 21, 2009 sweet Luke's Youtube Chan! Link to comment Share on other sites More sharing options...
Georgan Posted July 21, 2009 Share Posted July 21, 2009 Nice. The Golden GodsInteritusMayhem Makers ^Will always be in my heart. Pures, missing since late '08. Link to comment Share on other sites More sharing options...
Toby Posted July 21, 2009 Share Posted July 21, 2009 Mhmm Link to comment Share on other sites More sharing options...
Buax Posted November 20, 2009 Share Posted November 20, 2009 Surely this should be in web dev, not programming? Link to comment Share on other sites More sharing options...
+Karl Posted November 20, 2009 Share Posted November 20, 2009 Programming is a server side web programming language, it could go in either. IRC Nick - ``Karl "You lost me at biased."Need help? PM me Link to comment Share on other sites More sharing options...
Robertl333 Posted November 21, 2009 Share Posted November 21, 2009 Programming is a server side web programming language, it could go in either. :o give me ur rank 75/75 99/9991/90 Link to comment Share on other sites More sharing options...
+Karl Posted November 21, 2009 Share Posted November 21, 2009 :o give me ur rank You wish. IRC Nick - ``Karl "You lost me at biased."Need help? PM me Link to comment Share on other sites More sharing options...
Robertl333 Posted November 22, 2009 Share Posted November 22, 2009 You wish. grrr ima stole it from you 75/75 99/9991/90 Link to comment Share on other sites More sharing options...
`JvYv Posted November 26, 2009 Share Posted November 26, 2009 ^ Got A Problem/Question E-mail Me At [email protected]Yuila ♥Editing Video's + Caping Pm Me Link to comment Share on other sites More sharing options...
Recommended Posts