How do i access the user's ip address?



whenever i type echo $_SERVER[‘REMOTEADDR’] i get a private ip address and not the actual user ip

#2 is an excellent summary of how to get a user IP, and why you should only use an IP address if it is not critical (for instance, do not use IP addresses to authenticate users, as that address can easily be forged)