Jump to content

Server IP


Stooney

Recommended Posts

How would I go about finding the IP of my server with a script that's run locally on the server?  I made a script that will send my server ip to my cell phone when I request it (via emailing the server).  It's a dynamic IP.  When I try $_SERVER['SERVER_ADDR'] I just get 127.0.0.1.

 

I could just use file_get_contents on whatismyip.com or something, but there's got to be an easier way. 

Link to comment
https://forums.phpfreaks.com/topic/119052-server-ip/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.