Get ip from visiting pc/user
Posted: Fri Jul 13, 2012 10:19 am
I have been looking for a way to get the ip from the visiting pc on a website. I would need the ip to check if a visitor has already submitted a form from the website. So when this pc visits the website, it doesn't show the form.
I have found this bit of code here to do so:
This bit of code does work and it does give an ip but it seems it's not from a pc or device.
If i try to connect with another pc on the same network (such as wifi), then it's the same ip on all the devices. So it seems it takes the ip from the router and not from the pc itself.
Thanks in advance!
I have found this bit of code here to do so:
Code: Select all
$_SERVER['REMOTE_ADDR']
If i try to connect with another pc on the same network (such as wifi), then it's the same ip on all the devices. So it seems it takes the ip from the router and not from the pc itself.
Thanks in advance!