Tuesday, October 12, 2010

IP to Country

I was looking for a way to get the country of a site visitor. I found an API from that does the trick. Here's my snippet to get that data. (The api provides more, I'm just extracting the country code.)

//echo $response;

Now, if blogger hasn't mangled my code too badly, maybe that will help someone.

Thanks to