How to identify server IP address in PHP

The Solution to How to identify server IP address in PHP is


Like this for the server ip:

$_SERVER['SERVER_ADDR'];

and this for the port

$_SERVER['SERVER_PORT'];

~ Answered on 2011-04-27 07:49:27


Most Viewed Questions: