Geo IP Script

Fiver

New member
Jan 30, 2009
2,011
12
0
Anyone know of a GEOIP check script so I can redirect FB reviewers in the wrong country?
 


If you login to portal.a4d.com we have a php code generator for you. That pulls from our load tested geo API. It's got wizards where you put in what countries you want to go where and then where the fail over location if nothing matches.
 
I have my own script that does what Smaxor's script does, but much more simplistic. It takes one simple textfile as input where you have a countrycode, a keyword and a url on each line.
For example:
US;emailsubmit1;http://www.relatedpageforreviewers.com
CA;emailsubmit1;http://www.canadianemailsubmitpage.com
*;emailsubmit1;http://www.internationaloffer.com
*;otheroffer;http://www.otherpage.com
Then you can use http://www.yourdomain.com/emailsubmit1 and http://www.yourdomain.com/otheroffer to send your traffic to.

If for some reason you don't want to use Smaxor's script and are interested in mine, let me know. It needs PHP and MySQL.
 
Use Google's Javascript fun:

Code:
<script src="http://www.google.com/jsapi" language="javascript"></script>
<script language="javascript">
     alert('My country code is: ' + google.loader.ClientLocation.address.country_code);
</script>

Job done!
 
  • Like
Reactions: vgeek
yeah, maxmind pretty good, but make sure to download the free update every month. they keep it well updated. you'd be surprised how incorrect a 6 months old data file could be