PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I've been trying to find out how to obtain info from the visitor to a website. I've found that using the variable $_SERVER['REMOTE_ADDR'] will get me their ip address, however on some stat sites I see them obtain data as to their location and service provider. Is this done using a secondary search of the ip address? If so, how do you do that?
Yes, it is done by doing a search on the IP Address. However, IP addresses are not reliable for this information. it just becomes one big guessing game....
Simulacra wrote:REQUEST_URI or HTTP_REFERER to be put into $_SERVER['']
neither of those will tell you much about the user. The first will tell you the URI they requested on your server (if present), while the latter will tell you the URL the user was supposedly on before the current page request (very unreliable and very easily faked)