How can I get the IP address of a user that views a PHP page? In JSP it's
But how would I do it in PHP? What method?VB Code:
<%= request.GetRemoteAddr() %>
Printable View
How can I get the IP address of a user that views a PHP page? In JSP it's
But how would I do it in PHP? What method?VB Code:
<%= request.GetRemoteAddr() %>
It's stored in the REMOTE_ADDR CGI environmental variable, which PHP assigns to $REMOTE_ADDR, IIRC.
You did RC, it works fine. :)