PHP program to print the IP address of a hosted web server
<?php
//PHP program to print the IP address
//of a hosted web server.
$IpAddress = $_SERVER['SERVER_ADDR'];
printf("IP Address: %s<br>", $IpAddress);
?>
Output
IP Address: 127.0.0.1
