script for ip

  • suzie
  • Guru
  • Guru
  • User avatar
  • Posts: 1134
  • Loc: England

Post 3+ Months Ago

Hasanyone got a script for a smilie holding a flag saying "your ip address is " lol

I would like it thanks.

:explodesmilie:

And about the judge smilie where did you get that.. i like it..a lot !

:)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

It's kind of easy to make such a script. First of all, you will need a base image with the smile and a blank space to put the ip address.


Code: [ Select ]
<?php
  header("Content-type: image/png");

  $string = $_SERVE['REMOTE_ADDR'];

  $im  = imagecreatefrompng("images/smile_base.png");
  $orange = imagecolorallocate($im, 220, 210, 60);

  $x = 25; // String X position
  $y = 10; // String Y position

  imagestring($im, 3, $x, $y, $string, $orange);

  imagepng($im);
  imagedestroy($im);
?>
  1. <?php
  2.   header("Content-type: image/png");
  3.   $string = $_SERVE['REMOTE_ADDR'];
  4.   $im  = imagecreatefrompng("images/smile_base.png");
  5.   $orange = imagecolorallocate($im, 220, 210, 60);
  6.   $x = 25; // String X position
  7.   $y = 10; // String Y position
  8.   imagestring($im, 3, $x, $y, $string, $orange);
  9.   imagepng($im);
  10.   imagedestroy($im);
  11. ?>


You will have to change $x and $y to fit your base image.

Hope it helps.
  • suzie
  • Guru
  • Guru
  • User avatar
  • Posts: 1134
  • Loc: England

Post 3+ Months Ago

Thanks very much leo !!

8)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 87 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.