Aug 21
31
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:
-
# <?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);
- #?>
(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 widgetStep 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!
Tags:Copy, create, edit, edition, file, images, logs, rename, roots, upload
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
you can also grab the RSS feed or Subscribe to Techgurulive by Email
Not Getting
Related postsHow to start your own blog site – A Step by Step Guide
How to Hide Your Email Address From Spam Bots
































