Skip to content
Advertisement

Tag: lighttpd

PHP: getting user’s IP address using lighttpd

I tried this function but this always return the host/website’s IP address instead of the user’s IP any idea why and how to fix it? the website is not hosted on localhost and I’m using lighttpd to host the website Answer lighttpd provides the remote address in the CGI environment variable REMOTE_ADDR. lighttpd does not set HTTP_CLIENT_IP unless the request

Advertisement