How to find the ip address of the users, who login into my site,php [duplicate]
Possible Duplicate:
How do I find a user's IP address with PHP?
How to find the ip address of the users, who login into my site,php
$ip = $_SERVER['REMOTE_ADDR']
should do the trick.
PHP provides $ip = $_SERVER['REMOTE_ADDR']
$_SERVER['REMOTE_ADDR']
Will return the IP address where the request came from. This may be the proxy IP address however.
精彩评论