Image PHP Script


SUBMITTED BY: farrent

DATE: Jan. 23, 2016, 10:41 a.m.

FORMAT: Text only

SIZE: 561 Bytes

HITS: 6781

  1. <?php
  2. $ip = $_SERVER['REMOTE_ADDR'];
  3. $my_img = imagecreate( 250, 18 );
  4. $background = imagecolorallocate( $my_img, 35, 35, 35ini
  5. $text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
  6. $line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
  7. imagestring( $my_img, 4, 5, 1, "Your IP Is: $ip",
  8. $text_colour );
  9. imagesetthickness ( $my_img, 7 );
  10. header( "Content-type: image/png" );
  11. imagepng( $my_img );
  12. imagecolordeallocate( $line_color );
  13. imagecolordeallocate( $text_color );
  14. imagecolordeallocate( $background );
  15. imagedestroy( $my_img );
  16. ?>

comments powered by Disqus