echo "devil";

Getting IP addresses

27.07.2010 09:37 | PHP

If you need to get the IP address of the server or the user, here is how to get them:

echo $_SERVER['SERVER_ADDR']; // Get the servers IP

echo $_SERVER['REMOTE_ADDR']; // Get the users IP

Thank you $_SERVER!


Tags: php function, remote, server, ip

« Back «

Share |




RSS feed