How to identify server IP address in PHP December 12, 2022 by Tarik Like this for the server ip: $_SERVER['SERVER_ADDR']; and this for the port $_SERVER['SERVER_PORT'];