Jump to content

Hah, check this sig :p


Peksa

Recommended Posts

 

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

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.