Use the following code if you want to display the IP address of the server. Simply copy the code to a text file and save it as a .php file on the server.
For Linux with Apache, use the following code:
<?php
echo $_SERVER['SERVER_ADDR'];
?>
For Windows 2008 R2 with IIS 7.5 Server, use:<?php
echo $_SERVER['LOCAL_ADDR'];
?>