does anyone have a code (or a site where i can find a code for this)?
basically the only variables i would need for this are uId and IP but im not sure how to write one
does anyone have a code (or a site where i can find a code for this)?
basically the only variables i would need for this are uId and IP but im not sure how to write one
I do not know if this is what you are asking, but the user's IP is accessible from the $_SERVER['REMOTE_ADDR'] super-global variable. If there is something else you need, then I need a more thorough explanation.
And if you're looking for a way to resolve an IP address to the hostname, you could use a function such as [man]gethostbyaddr/man.
sorry for not being clear.
what i need is basically Ip resolves to hostname,location
You will need access to a database or perhaps a web service of some kind to get the IP-to-location relationship. I know there are a number of databases you can purchase; but I do not know if there are any freeware ones worth bothering with.
do you have any suggestions?