Tech Support Guy banner
Status
Not open for further replies.

Solved: Getting country without database

1.1K views 4 replies 2 participants last post by  brendandonhu  
#1 ·
Every example I've seen to get the country from the IP has includes a database. Is there a way to get the country from just a text file rather than a database?
 
#2 ·
You could store your database of IPs in a text file but it would be incredibly slow to sort through it (probably too slow to be usable.)
MaxMind has an IP to country database in CSV (text) format if you want to try that but it's over 6 megs.

Or you could have your script grab the country from a database on someone else's site if you just don't want to host the database yourself.
 
#4 ·
I was actually going to use it on a different site to determine country then redirect to a certain section based on their language and country.

Xenweb is a hobby site. After I get this country thing working, I'll add it to that page. Btw, do you write down every link I post on the Internet? You got that link pretty fast :p I'm kinda scared, are you stalking me :eek:
 
Status
Not open for further replies.
You have insufficient privileges to reply here.