Re: [PHP] Countries and ip addresses

2001-08-20 Thread speedboy
How can I find out from witch country user is based on user ip address? I need this from php script. You can't. You can try with their hostname. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] Countries and ip addresses

2001-08-20 Thread Tom Carter
It's not possible to be assured of doing this properly for the following reason.. 1. not all hosts translate to IP address 2. Soem host names are often meaningless (eg .com) The way to do it is basically this 1. use gethostbyaddr() (http://www.php.net/gethostbyaddr) to do a reverse DNS from IP