how to get IP address?


Posted on 16th Feb 2014 07:03 pm by admin

hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

Code: <?php if ($_SERVER['HTTP_X_FORWARD_FOR']) {
$ip = $_SERVER['HTTP_X_FORWARD_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
?>
but all i get back when i test it is:
Quote::1

how come the IP isnt showing, and what does "::1" mean?

thanks guys

No comments posted yet

Your Answer:

Login to answer
140 Like 49 Dislike
Previous forums Next forums
Other forums

i want run some web server under the ip sharer
hello i want run some web server under the ip sharer
my ip is floating ip but it doesnt matter

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

PO Release Strategy Issue
Hi Experts,

I am facing an issue related to PO release strategy. The details are-
<

I need help on this PHP code
Hi everybody, I made some kind of mistake while editing the code below. As you see, at the 3 row my

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my

Error in query: Resource id #4??
hey guys, having a minor (i think) problem here that i havent been able to figure out. long story sh

b+ tree
Hi
can every body help me about b+ tree ?(insert & delete)

reorder sql query
ok so i have this very simple code:
Code: $query = "SELECT search_keywords, COUNT(search_key

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash