how to display ip address php script code function from visitor user

Mobile
feeds
Welcome Login | Register

how to display ip address php script code function from visitor user
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » PHP Forums
        » » how to display ip address php script code function from visitor user
how to display ip address php script code function from visitor user
Post Description: how to display ip address php script code function from visitor user PHP
Post Tags:
This Post Has Been Viewed 13376 Times Since Wed Sep 13, 2006 4:56 pm Author hostman with 15 replies
how to display ip address php script code function from visitor user
Advertise On This Page




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 &gt;&gt;&gt;&gt;&gt;</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




Leave Your Comments

Share:   Subscribe - Keep Up With This Topic
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
Fourms BBCODE:
Links Related to : how to display ip address php script code function from visitor user
Add Link:

Comments and replies About how to display ip address php script code function from visitor user
:: 1 :: Reply #330 Reply By Php linus On Sun Feb 11, 2007 2:34 pm
Php linus:
this is a greapt beginers tutorial for php code example to show ip address
:: 2 :: Reply #16474 Reply By rofllllllll On Sun Aug 19, 2007 9:59 am
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
:: 3 :: Reply #24760 Reply By poo On Thu Oct 18, 2007 2:16 pm
poo:
wth>?????? -.-?
:: 4 :: Reply #26172 Reply By mark bloom (london) On Wed Oct 31, 2007 2:01 am
mark bloom (london):
thank you
:: 5 :: Reply #45495 Reply By Seven On Fri Mar 14, 2008 8:36 pm
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.
:: 6 :: Reply #45535 Reply By hostman On Sat Mar 15, 2008 6:24 am
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
:: 7 :: Reply #55886 Reply By rtrt On Sat May 31, 2008 1:59 am
rtrt:
astrological configurations in order of explore pertinent solutions. he is a dynamic personality and a brilliant orator. he has a management ba
:: 8 :: Reply #62082 Reply By tutorial On Wed Jul 16, 2008 9:35 pm
tutorial:
where we have to paste the code to get the visitors ip address in php
:: 9 :: Reply #65372 Reply By jovie On Thu Aug 07, 2008 6:13 pm
jovie:
20080807-65372-zoomer.fpg.jpg
thankz for sharing
:: 10 :: Reply #90722 Reply By devidas patle On Tue Jan 20, 2009 6:37 am
devidas patle:
give ip code generate .
:: 11 :: Reply #92019 Reply By bigT On Thu Jan 29, 2009 10:30 pm
bigT:
please explain step 2. i don't understand &quot saving.
:: 12 :: Reply #93387 Reply By Timzy On Mon Feb 09, 2009 3:52 pm
Timzy:
wouldnt it be echo $_server[remote_addr]
:: 13 :: Reply #102332 Reply By venkat20 On Mon May 04, 2009 8:27 pm
venkat20:
i found the details of ip-address on the other site named as <a href=" ip-details /">ip-details </a>
:: 14 :: Reply #107204 Reply By Raina On Wed Jun 24, 2009 2:07 am
Raina:
hey the code should be like this

<?php
echo $_server[remote_addr];
?>
wise it won't work. update your post

:: 15 :: Reply #107210 Reply By wallpaperama On Wed Jun 24, 2009 5:04 am
wallpaperama:
thanks,

we have updated the script