I have developed a PHP webservice. I would like to log all incoming connections of the WS clients, which are consuming this web service. How can I obtain the client's IP address? The value of
$_SERVER['HTTP_CLIENT_IP']
seems to be always empty.
This should be what you want:
$_SERVER['REMOTE_ADDR']
The IP address from which the user is viewing the current page.