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!