Sieryuu
Sieryuu

Reputation: 1521

Get Country, GMT, City by IP address using PHP

I have tried to get the Country, City, and GMT using js by set it to cookies, and then I fetch it with PHP to save into Database. But the method I used, is does not work sometimes, So, is there anyway to get them by using PHP alone? or is there another way by using JS?

I using this js provided by maxmind

<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>

But I often fail to save the data.

Upvotes: 1

Views: 3481

Answers (1)

dhchen
dhchen

Reputation: 1198

PHP GeoIP extension may help you

Upvotes: 1

Related Questions