This Howtos posted under: IT-Tips, Open Source | Total Visitors Till Now: 30

How to Display your visitors IP address on your web-site

IP Address Tutorial:

Step 1. Create a new.txt document on your desktop

Step 2. Copy the following code into the new.txt document

PHP:

  1. # <?php
  2. # $img_number = imagecreate(180,20);
  3. # $backcolor = imagecolorallocate($img_number,70,73,80);
  4. # $textcolor = imagecolorallocate($img_number,255,255,255);
  5. # imagefill($img_number,0,0,$backcolor);
  6. # $number = ” Your
    IP Address
    $_SERVER[REMOTE_ADDR]“
    ;
  7. #Imagestring($img_number,2,2,2,$number,$textcolor);
  8. #header(“Content-type: image/jpeg”);
  9. #imagejpeg($img_number);
  10. #?>
(remove the hash)

Step 3. Rename the new.txt document ip.php and upload it to the root of your website

Step 4. Log into your WordPress administration panel and locate a template file where you would like to display the

visitors

IP address
. I use a sidebar text widget

Step 5. Copy the following code into your template replacing the address with your website address

<img src=“http://yoursite.com/ip.php”>

To change the colors, edit backcolor and textcolor img_number RGB numeric values
To change the font size, edit the imagestring numeric values

That’s all there is to it,
Enjoy!


  Posted by admin on August 21, 2008 at 12:09 am

No comments [Comments are now closed for this post]  Tags: , , , , , , , , ,

Coolsearchinfo - A free Social Bookmarking Site

Liked this article? To continue getting our latest free Howtos and Tutorials,
you can also grab the RSS feed or Subscribe to Techgurulive by Email

Not Getting



Related posts
  • How to start your own blog site – A Step by Step Guide
    Now a days all want to blog, what is blogging? A blog is a type of website, usually maintained by an individual with regular entries of commentary, descriptions of events,...
  • How to Hide Your Email Address From Spam Bots
    The problem is that one of the main methods that spammers use to obtain email addresses is to send a robot out to the internet whose primary purpose is to...