How To Display IP Address PHP Script Code Function From Visitor User
how to display ip address php script code function from visitor user
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
POST# 334
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: 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


Sun Feb 11, 2007 2:34 pm
1
Php linus
Reply #904
this is a greapt beginers tutorial for php code example to show ip address
Sun Aug 19, 2007 9:59 am
2
rofllllllll
Reply #905
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
Thu Oct 18, 2007 2:16 pm
3
poo
Reply #906
wth>?????? -.-?
Wed Oct 31, 2007 2:01 am
4
mark bloom (london)
Reply #907
thank you
Fri Mar 14, 2008 8:36 pm
5
Seven
Reply #908
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.
Sat Mar 15, 2008 6:24 am
6
hostman
Reply #909
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

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload