Nadril Posted February 1, 2005 Share Posted February 1, 2005 It's nice to see my home Country name displayed in such a sig... What puzzles me is why ? What or who are you trying to make fun of ? I personaly don't plan to read the above brainburning posts... what are you? last time i checked he's jeppoz. I could be wrong though...... :shock: And on topic, thats a preaty sweet sig :P :D Link to comment Share on other sites More sharing options...
dark_ice Posted February 1, 2005 Share Posted February 1, 2005 oh [garden tool]!! i get it now! thats cook but how do you do that? :? Link to comment Share on other sites More sharing options...
Peksa Posted February 1, 2005 Author Share Posted February 1, 2005 I did it in php.. Here's the code. <?php header("Content-type: image/png"); include('mysql.php'); $link = mysql_connect("xxx", $user, $pass) or die(mysql_error()); mysql_select_db('xxx') or die("Could not select database"); $im = @imagecreate(300, 50) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 255, 128, 0); $ip = $_SERVER['REMOTE_ADDR']; $query = "SELECT country FROM iptoc WHERE ipFrom<=inet_aton('$ip') AND ipTo>=inet_aton('$ip')"; $result = mysql_query($query); $line = mysql_fetch_array($result); if ($line['country'] == "") $country = "n/a"; else $country = $line['country']; $ord = explode(" ", $line['country']); $i = 0; $country = ''; while ($i <= count($ord) - 1) { $country .= ucfirst(strtolower($ord[$i])) . " "; $i++; } imagestring($im, 20, 25, 15, $country . "rocks!", $text_color); imagepng($im); imagedestroy($im); mysql_close($link); ?> Link to comment Share on other sites More sharing options...
Korla Posted February 1, 2005 Share Posted February 1, 2005 whoa, that's pretty sweet. :D Link to comment Share on other sites More sharing options...
unknownmasterofnothing Posted February 1, 2005 Share Posted February 1, 2005 heh was confused at first, but it is pretty cool. Link to comment Share on other sites More sharing options...
Peksa Posted February 1, 2005 Author Share Posted February 1, 2005 heh was confused at first, but it is pretty cool. :) Link to comment Share on other sites More sharing options...
Jaguar_Kings Posted February 1, 2005 Share Posted February 1, 2005 Dutch: Ik ben er mee eens. English: I agree. Finnish: Samaa mieltÃÆÃâÃâä I'm from the netherlands lol :P Link to comment Share on other sites More sharing options...
cadburys_egg Posted February 1, 2005 Share Posted February 1, 2005 england r pwn j00 Link to comment Share on other sites More sharing options...
crimsonking Posted February 1, 2005 Share Posted February 1, 2005 United States rocks??? Sounds like you should get out more. ~^v^~Ex-Leader of the Divine Flames of Redemption~^v^~ Link to comment Share on other sites More sharing options...
Nadril Posted February 1, 2005 Share Posted February 1, 2005 United States rocks??? Sounds like you should get out more. Sounds like you should read the topic more :roll: Link to comment Share on other sites More sharing options...
Quer_Skulll Posted February 1, 2005 Share Posted February 1, 2005 United States rocks??? Sounds like you should get out more. so your from the states.. read the topic mate... Link to comment Share on other sites More sharing options...
Recommended Posts