Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get timezone by IP [duplicate]

I have a registration by which i can get the IP address of user who registers.

I want to get the timezone of user by his IP address.

Like in jquery we can get like this Timezone in jquery

How can i do it in PHP.

like image 940
Happy Avatar asked Feb 17 '14 10:02

Happy


1 Answers

You can use GeoIP based services http://www.php.net/manual/en/book.geoip.php

Or

You can use online services that gives timezone of the IP that you supply in request

i.e.

$tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=94.55.180.139'); 
echo $tags['timezone'];
like image 182
Jayendra Avatar answered Oct 22 '22 17:10

Jayendra