1

When I'm trying to obtain user IP address $_SERVER['REMOTE_ADDR'] it returns me server IP address instead. I'm using PHP in Apache.

What problem it could be? I'm using own VPS from digitalocean with LAMP in ubuntu 14.04

Arnas Pečelis
  • 1,000
  • 2
  • 12
  • 32

1 Answers1

1

Well, I am eating my words now.

This is interesting.

Let try another:

<?php
phpinfo(); 
?>

I am stumped, I will think about it. I have posted my phpinfo and yours.
Yours should also have 99.3.150.55 for _SERVER['REMOTE_ADDR']

enter image description here

enter image description here

No, I highly doubt what you are saying is true. You are overlooking something.

If you are willing to give me a link, put this script on your Server:

I would like to go to that link and see your Servers IP address come up when I visit.

<?php
echo $_SERVER['REMOTE_ADDR'] ;  
?>
Misunderstood
  • 5,534
  • 1
  • 18
  • 25