> Thank you Andrew,but in China mainland ,I saw many websites can even tells > the province information which the user come from and I think in USA the > State information can also be gotten from the visitor's ip address.BTW,in > PHP what we can get is just the ip address of the user how can we get the > host name ?Anything missed here?
A database may exist for IPs in China (I don't know), but outside of China it's impossible to tell with much accuracy which country an IP is in. You could look at Digital Envoy, which was an attempt a couple of years ago to 'map the internet' and obtain exactly the data you're referring to. The problem is that as soon as that data is published it's out of date due to routing changes and network configuration changes. You can do a reverse lookup on the IP address to get the hostname, but you can rely on that even less - for example, a hostname ending in aol.com could be in the USA, Europe, Asia, or Australia these days. Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]