문제

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.

도움이 되었습니까?

해결책

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'];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top