PDA

View Full Version : A script to serve YPN or Adsense based on location



KelliShaver
11-19-2006, 05:55 PM
I tossed this together this afternoon. It's rough, but it works. Basically it lets you manage and create ad zones for your website, giving you the option to enter ad code for both Google Adsense and Yahoo! Publisher Network ads. Then, when a visitor happens upon your site, it checks to see where they're coming from and if they're in the US, it serves YPN ads. Otherwise, it serves them Adsense ads.

Instructions, etc. are in the readme.

Thought someone might find it useful.

Download (http://www.kellishaver.com/misc/adserver.zip)

masm50
11-19-2006, 06:50 PM
That sounds like it could be useful to quite a few people.
Any chance of a screenshot or demo?

-Tim

KelliShaver
11-19-2006, 07:15 PM
I don't have a demo up at the moment, though I may put one up. Here are some screenshots (http://www.kellishaver.com/misc/adserver_screens), though. It's very basic. :)

KelliShaver
11-20-2006, 07:25 PM
I've discovered a few bugs in this. Unfortunately, i won't get a chance to fix them for a few days.

Westech
11-21-2006, 02:17 PM
Nice! Anyone looking for a quick solution to use while waiting for Kelli's update check this out: http://www.websitepublisher.net/article/geotargetting-php/

Once you get this fixed up I might start using it instead. It would be nice to have an interface to use instead of escaping quotes and pasting code.

ramprage
12-11-2006, 08:37 PM
KelliShaver - both links are busted.

I haven't made a geotargetting system but I've made an easy option to choose the ad type (google or yahoo) and format :)

KelliShaver
12-12-2006, 02:06 AM
Yah, I got busy with stuff, had family things come up, and haven't had a chance to fix anything. :( Hopefully sometime in the next week or so!

Carl L.
12-12-2006, 10:12 AM
I use PhpAdsNew. It has built in geo targetting options. It's also free.

Todd W
12-12-2006, 11:29 AM
You could just use the MaxMind free db and make a quick lil php script.