YOUR IP ADDRESS IS: 38.103.63.59
In order to maintain security to your website, its important to know who is visiting your website. One way is to get the user's IP Address.
This is the PHP Function to display your visitor's IP Address:
First, its important that you have php. If you don't have php, we recommend you buy a php plan from our friends at www.webune.com they have great PHP hosting plans for your domain name or website.
Ok, that's all you need - PHP hosting. Once you know you have php, you can continue, otherwise, if you don't, this script will not work unless the script is parsed by PHP engine.
1. the first step in this tutorial guide is to copy and past the sample code below to your favorite editor, I will be using notepad.exe in Windows for this simple tutorial. So, copy and paste this code:
<h1>Show My Ip Address Script</h1><hr>
By <strong>Wallpaperama.com</strong><br><br>
Your Ip Address is: <strong><?php echo $_SERVER['REMOTE_ADDR']; ?></strong><br><br>
Cool! - See how simple it is to get and display the ip address of your visitors to your site. We hope you learned from this show tutorial on how to display your ip address using php<br>
<br>
If you want to see more helpful scripts for your website, <a href="http://www.wallpaperama.com">Click Here to See More Helpful Scripts >>>>></a>
2. Now save this file as "show-ip.php", if you are using notepad, make sure to put the quotes ( " ) when Saving As
3. Now upload the show-ip.php file to your hosting space on your website which has PHP.
our friends at www.webune.com have provided us with PHP hosting to bring you a demo of this script.
IF you found this tutorial helpful, we would appreciate a word of mouth to your friends about wallpaperama or link back to wallpaperama.com
Comments and replies About how to display ip address php script code function from visitor user
Php linus:
this is a greapt beginers tutorial for php code example to show ip address
rofllllllll:
wtf are u off your head this isnt worth word of mouth wallpaperrama... shouldnt u bee making wallpapers wtf is this short a$s bu1l5hi7 tutorial... all u are doing is pluging you hosting provider roflllllllllllll
Seven:
all this code does is display the ip address back to the user. this tutorial falsely states that it will enhance security "in order to maintain security to your website, its important to know who is visiting your website. one way is to get the user's ip address.
this is the php function to display your visitor's ip address". do not believe it. for the newbies out there "echo" just tells the script to display whatever is between the quotes, in this case it is asking the server to report the user's ip address and is printing it where ever it is told to on the page. i hope this makes sense.
hostman:
one way you can enhanced security in your website is by using your the ip address variable..
for example, here on this forums, each administrator records your ip address. well, lets say i want to block a user coming to this website, i can by the ip address. the ip address will be recorded in a database and if it matches your ip address to the ip address of my database, you will not be able to see content instead you may see a message that says:
sorry you are blocked from this website
so that's one way of securing your website
rtrt:
astrological configurations in order of explore pertinent solutions. he is a dynamic personality and a brilliant orator. he has a management ba
tutorial:
where we have to paste the code to get the visitors ip address in php
bigT:
please explain step 2. i don't understand " saving.
Timzy:
wouldnt it be echo $_server[remote_addr]
venkat20:
i found the details of ip-address on the other site named as <a href=" ip-details /">ip-details </a>
Raina:
hey the code should be like this
<?php
echo $_server[remote_addr];
?>
wise it won't work. update your post
wallpaperama:
thanks,
we have updated the script