How to get the User IP in PHP

Get the IP in PHP using this simple valueÑ

$ip=$_SERVER['REMOTE_ADDR'];

If you want to test with your own host or localhost, then you can try Dame Mi IP, it’s a simple service that allows you to check what is your IP assigned by your ISP.

Advertisement

Did you like it?

No comments yet.

Leave a Comment