Himansu
Himansu

Reputation: 21

Get timezones based on zipcode

I want to get the current time based on my input zipcode in php.

E.g. If i will enter 71020 then I want the accurate time of that location.

Is there any web service exists to which I can make a call by sending parameter as zipcode.

Please help me out.

Thanks

Upvotes: 0

Views: 13707

Answers (2)

StackMasterGeneral
StackMasterGeneral

Reputation: 1

Not sure about web services but maxmind has databases you can buy to do ip lookups

Upvotes: 0

Matt Johnson-Pint
Matt Johnson-Pint

Reputation: 241808

First use a service that will give you the latitude and longitude on a zip code. There are many, but an easy one is GeoNames. If you search here on StackOverflow or Google, you will find plenty of others.

Then take a look at the many different ways you can resolve a time zone from a latitude and longitude.

Upvotes: 2

Related Questions