Mapping IP to Olson/zoneinfo database

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!

Moderator: General Moderators

Post Reply
User avatar
Popcorn
Forum Commoner
Posts: 55
Joined: Fri Feb 21, 2003 5:19 am

Mapping IP to Olson/zoneinfo database

Post by Popcorn »

hello people, ok, so i swear i *have* looked but ...

i am using the Olson/zoneinfo/'tz database' database.

all i want is to be able to map the user IP to an entry (like Asia/Hong_Kong) in that database.

there are IP location services which can give me country, city, coordinates, etc.

and i can even get something like http://www.earthtools.org/webservices.htm#timezone to return "time zone and local time" from those coords.

i don't want any user input ... none of that dropdown business. I am using JS and PHP and using the JS offset and PHP's "timezone_name_from_abbr()" is close but cannot guarantee it (especially seeing as the fn has bugs, good grief). i don't really wanna manually map from the 'IP to location' CSV data that seems to be available, as that is static.. oh and manual.

i'd very much appreciate the link/technique that i have missed....
Post Reply