I am developing a PHP application that will be run only on the local network of a business. The application will be installed to the server using a custom installer like thing we made using Stunnix Advanced Webserver.
As part of making the application more user friendly I am planning to display the LOCAL IP of the server so that it is extremely easy for the other computers in the network to access the application by just typing this IP in their address bar.
The problem is I cannot get the LOCAL IP of the server.
I have tried
SERVER_NAME ( Displays just 127.0.0.1 )
REMOTE_ADDR ( Displays client external IP )
SERVER_ADDR displays the correct IP but it does so only if I access it from a client using the IP which totally defeats its purpose.
I just want to display the LOCAL IP of the server upon access directly from the server through http://localhost
itself.
I am somewhat sure that this isn't possible. But if it is, please help.
EDIT
I am developing a cross platform PHP server application kind of thing. We bundle Apache,PHP installers and a SQlite database as a one click installer alongside our PHP application to make it as user friendly as possible. Anyone can deploy it on their computer running Windows,Mac or Linux. After installing when the user opens the application on the server he can see the ip address [local ip] and port which can be used to connect to this server. The application will be run only on the local network and not on the internet.
It should show the local IP just like the Android app called Air Droid does. Screenshot : https://lh3.ggpht.com/PmLopRm-Lj9WTnzm2MBI-bTbCLopAyqtd4C_4nvyDwLg8X0QwDbBbEREdWGHG5xku4s