How To Display IP Address PHP Script Code Function From Visitor User



How To Display IP Address PHP Script Code Function From Visitor User
 (380) Click. Work. Collect
How To Display IP Address PHP Script Code Function From Visitor User
Post Description:
Post Tags: how, to, display, ip, address, php, script, code, function, from, visitor, user
This Post Has Been Viewed 8157 Times Since Wed Sep 13, 2006 4:56 pm Posted By hostman with 7 replies
How To Display IP Address PHP Script Code Function From Visitor User
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.

[This post sponsered by www.webune.com]
post picture

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:


     Code:
<?php
echo $_SERVER['REMOTE_ADDR'];
?>


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.

CLICK HERE TO SEE DEMO

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     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Display IP Address PHP Script Code Function From Visitor User




:: 1 :: #330 - Reply By Php linus On Sun Feb 11, 2007 2:34 pm
this is a greapt beginers tutorial for php code example to show ip address
:: 2 :: #16474 - Reply By rofllllllll On Sun Aug 19, 2007 9:59 am
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 :: #24760 - Reply By poo On Thu Oct 18, 2007 2:16 pm
wth>?????? -.-?
:: 4 :: #26172 - Reply By mark bloom (london) On Wed Oct 31, 2007 2:01 am
thank you
:: 5 :: #45495 - Reply By Seven On Fri Mar 14, 2008 8:36 pm
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 :: #45535 - Reply By hostman On Sat Mar 15, 2008 6:24 am
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 :: #55886 - Reply By rtrt On Sat May 31, 2008 1:59 am
astrological configurations in order of explore pertinent solutions. he is a dynamic personality and a brilliant orator. he has a management ba