
Filtering Traffic…
In the comments, Dave asked, “How do you have your code setup to display AdSense to non-us people with YPN to us residents?”
Two Easy Steps
- Download geoIP.dat and geoIP.inc files (test folder)
Maxmind.com provides these two files, which will allow you to setup a free version of geotargeting for a php based site with 98% accuracy. The geoIP files are basically a database of countries. - Create the test.php
Create a test.php file in the same directory as the geoIP files. You’ll be adding the following code into the test.php file. Replace the AdSense and YPN coding with yours also keep the “quotes” in both the ad code with the backslashes as shown. example code. On this page.
You should be able to easily modify the coding to work with your site. To find out more, checkout this article on Advertisement Geotargetting with PHP. It has more in-depth information on doing this.

HOME








February 24th, 2007 at 11:41 am
What’s happened to your links section Bob?!
February 24th, 2007 at 2:54 pm
I’m sorry, my sever has been messing up. The links are back up but my design is a default. It will be up and running like it was soon.
February 24th, 2007 at 11:27 pm
Thanks Bob for posting this! Can you contact me on the email I provided? I’ve got to ask you a few things.
Thanks