Stooney Posted August 10, 2008 Share Posted August 10, 2008 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 More sharing options...
Guardian-Mage Posted August 10, 2008 Share Posted August 10, 2008 As far as I am aware, there are no ways to get the Server IP with PHP, unless you use system() or exec() to execute a shell command or windows command Link to comment https://forums.phpfreaks.com/topic/119052-server-ip/#findComment-613060 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.