Skip to main content
Post Closed as "Duplicate" by Your Common Sense php
edited tags
Link
Your Common Sense
  • 158.2k
  • 42
  • 226
  • 374
edited tags
Link
VLAZ
  • 29.6k
  • 9
  • 65
  • 88
Source Link
Pixel1002
  • 196
  • 1
  • 3
  • 12

How to get IP address / location of connecting visitors to my website, and show THEIR addresses to me?

i am looking for help in this problem. I know how to get IPv4 address in PHP code, like this:

$ip = $_SERVER['REMOTE_ADDR']; 

this is what i found as answer for many questions like this here, but if i go to the website, it only shows MY ip address, if my friend goes to the website he sees only his ip address. The thing is, i will have administrator interface on the website, and i need to determine the ip address of all connecting clients - either in php or javascript and display it on my website in the admin interface. On server apache is running. Is there any way to do it?