The IP address of a client, who is connected, can be obtained easily in PHP by making use of the following syntax:
$_SERVER["REMOTE_ADDR"];