Display your visitors IP address on your site and blog


METHOD 1:


Visitors IP Address This tutorial explains how to display your visitors IP address on your Website or Blog using a php script. You can see a demo located in the sidebar right here on my blog. The file is actually called into the template as an image file. It's a simple php code and the process is straightforward. So let's get started.



                                            

Display Visitors 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
$img_number = imagecreate(180,20);
$backcolor = imagecolorallocate($img_number,70,73,80);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = " Your IP Address $_SERVER[REMOTE_ADDR]";
Imagestring($img_number,2,2,2,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
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



METHOD 2:




<img src="http://widget.addgadgets.com/ipaddress/" alt="Weather Widget">


All you need to do is to Paste the following code in the Layout >> Add a Gadget >> Add HTML/JavaScript area. This will display IP Addresses of your users along with their OS, Location and Browser details.


In this way you can easily show IP Address of your users easily and you would be able to inform your users about their Internet Protocol (IP), their operating system, location and their browser’s detail. This is not only become the source of inspiration of your users rather this will look charming and will become the source of attractiveness of your site and crawl more visitors.



please comment and share if you like....






Comments