LemonInflux Posted August 28, 2007 Author Share Posted August 28, 2007 Doesn't work :| not sure my host supports .htaccess though. ah well. Link to comment https://forums.phpfreaks.com/topic/66898-solved-runescape-stat-signature-maker/page/4/#findComment-336109 Share on other sites More sharing options...
chocopi Posted August 29, 2007 Share Posted August 29, 2007 I know you have already solved this, but i had done something similar untill I had a powercut <?php $image_link = "demo.png"; $image = imagecreatefrompng($image_link); $font_colour = imagecolorallocate($image, 0, 0, 0); $font_size = 5; $array = array(0 => array(0 => "10", 1 => "28", 2 => "8"), 1 => array(0 => "12", 1 => "28", 2 => "32"), 2 => array(0 => "30", 1 => "28", 2 => "54"), 3 => array(0 => "22", 1 => "28", 2 => "79"), 4 => array(0 => "5", 1 => "28", 2 => "103"), 5 => array(0 => "13", 1 => "82", 2 => "8"), 6 => array(0 => "25", 1 => "82", 2 => "32"), 7 => array(0 => "32", 1 => "82", 2 => "54"), 8 => array(0 => "28", 1 => "82", 2 => "79"), 9 => array(0 => "18", 1 => "82", 2 => "103"), 10 => array(0 => "4", 1 => "135", 2 => "8"), 11 => array(0 => "54", 1 => "135", 2 => "32"), 12 => array(0 => "14", 1 => "135", 2 => "54"), 13 => array(0 => "34", 1 => "135", 2 => "79"), 14 => array(0 => "31", 1 => "135", 2 => "103"), 15 => array(0 => "19", 1 => "189", 2 => "8"), 16 => array(0 => "1", 1 => "189", 2 => "32"), 17 => array(0 => "31", 1 => "189", 2 => "54"), 18 => array(0 => "23", 1 => "189", 2 => "79"), 19 => array(0 => "14", 1 => "189", 2 => "103"), 20 => array(0 => "27", 1 => "239", 2 => "8"), 21 => array(0 => "38", 1 => "239", 2 => "32"), 22 => array(0 => "21", 1 => "239", 2 => "54")); $array_num = count($array); for($i = 0; $i < $array_num; $i++) { $stat = $array[$i][0]; $x = $array[$i][1]; $y = $array[$i][2]; imagestring($image, $font_size, $x, $y, $stat, $font_colour); } header("Content-type: image/gif"); imagepng($image); ?> The reason why the code didnt work in my last post was because I used gif instead of png This code works by just pulling in all out of an array(I only recently learnt how to use arrays and I love them ). The first number being the stat, the second being the x coordinate and the third being the y coordinate. I know you have it working but I thought I would give you this code seeing as I would have posted it days ago, but I couldn't ~ Chocopi Link to comment https://forums.phpfreaks.com/topic/66898-solved-runescape-stat-signature-maker/page/4/#findComment-337078 Share on other sites More sharing options...
Dragen Posted August 29, 2007 Share Posted August 29, 2007 yeah, that's almost how my code looked originally, then I realised that all those arrays were a bit confusing so I shortened it. Link to comment https://forums.phpfreaks.com/topic/66898-solved-runescape-stat-signature-maker/page/4/#findComment-337086 Share on other sites More sharing options...
chocopi Posted August 29, 2007 Share Posted August 29, 2007 yea i know what you mean, your codes quite clever, I wouldn't have thought of doing it that way Link to comment https://forums.phpfreaks.com/topic/66898-solved-runescape-stat-signature-maker/page/4/#findComment-337088 Share on other sites More sharing options...
Dragen Posted August 29, 2007 Share Posted August 29, 2007 hehe thank neither did I until it happened Link to comment https://forums.phpfreaks.com/topic/66898-solved-runescape-stat-signature-maker/page/4/#findComment-337098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.