Warning: Cannot modify header information - headers already sent by (output started at /home/blogion/public_html/blog/wp-includes/default-filters.php:234) in /home/blogion/public_html/blog/wp-includes/feed-rss2-comments.php on line 8
Comments on: Geo targeting your ads with Ad Buttons http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/ blogging about blogging... Mon, 18 Jan 2010 02:34:36 +0000 http://wordpress.org/?v=2.9.1 hourly 1 By: Nico http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-26443 Nico Wed, 11 Nov 2009 07:07:49 +0000 http://blogio.net/blog/?p=244#comment-26443 Jon, the plugin uses the <a href="http://www.ip2nation.com/">ip2nation database by Per Gustafsson</a> There are a few code samples on how to use it on his site. Using one of the samples, here's something you can try: <code> $sql = 'SELECT country FROM ip2nation WHERE ip < INET_ATON("'.$_SERVER['REMOTE_ADDR'].'") ORDER BY ip DESC LIMIT 0,1'; list($country) = mysql_fetch_row(mysql_query($sql)); switch ($country) { case 'se': // Show Swedish ad echo"YOUR SWEDISH AD CODE HERE"; exit; case 'us': // Show US ad echo"THIS IS WHERE THE US AD CODE GOES"; exit; default: // Ad for the rest of the world echo"AD CODE TO SHOW TO OTHERS"; exit; } </code> Jon, the plugin uses the ip2nation database by Per Gustafsson There are a few code samples on how to use it on his site. Using one of the samples, here’s something you can try:


$sql = 'SELECT
country
FROM
ip2nation
WHERE
ip < INET_ATON("'.$_SERVER['REMOTE_ADDR'].'")
ORDER BY
ip DESC
LIMIT 0,1';

list($country) = mysql_fetch_row(mysql_query($sql));

switch ($country) {
case 'se':
// Show Swedish ad
echo"YOUR SWEDISH AD CODE HERE";
exit;
case 'us':
// Show US ad
echo"THIS IS WHERE THE US AD CODE GOES";
exit;
default:
// Ad for the rest of the world
echo"AD CODE TO SHOW TO OTHERS";
exit;
}

]]>
By: Jon http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-26432 Jon Wed, 11 Nov 2009 00:38:48 +0000 http://blogio.net/blog/?p=244#comment-26432 Hi, I posted this on Wordpress.org, but maybe here is a better place to ask. I am using Adbuttons specifically for the geotargeting to display different ads to UK and US viewers. I have 4 125px ads for each country. What I could love is a way to display some additional adverts by placing code in template files (e.g. single.php) and using the geo targeting database to do this. For example, I have one advertiser that only wants to show ads to UK, and the advert is javascript so cannot use img/url anyway. Is this possible? I am sure it must be relatively simple, and would be good to make use of the geo targeting database. Hi, I posted this on Wordpress.org, but maybe here is a better place to ask.

I am using Adbuttons specifically for the geotargeting to display different ads to UK and US viewers. I have 4 125px ads for each country.

What I could love is a way to display some additional adverts by placing code in template files (e.g. single.php) and using the geo targeting database to do this. For example, I have one advertiser that only wants to show ads to UK, and the advert is javascript so cannot use img/url anyway. Is this possible? I am sure it must be relatively simple, and would be good to make use of the geo targeting database.

]]>
By: Jeet http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-25005 Jeet Thu, 24 Sep 2009 15:04:53 +0000 http://blogio.net/blog/?p=244#comment-25005 Hi Nico! Agreed to Rob - great plugin. Thanks for keeping it free. Im sure that everyone should measure the increase in income from your plugin and share it with you through donation :) Thanks again for your work. Hi Nico!
Agreed to Rob – great plugin.
Thanks for keeping it free.
Im sure that everyone should measure the increase in income from your plugin and share it with you through donation :)
Thanks again for your work.

]]>
By: Nico http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24958 Nico Tue, 22 Sep 2009 12:58:03 +0000 http://blogio.net/blog/?p=244#comment-24958 Rob, that is something that will quite likely be added in a future release of the Ad Buttons plugin Rob, that is something that will quite likely be added in a future release of the Ad Buttons plugin

]]>
By: Rob http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24905 Rob Sat, 19 Sep 2009 01:57:34 +0000 http://blogio.net/blog/?p=244#comment-24905 Hey Nico! Great plug-in, but I like it so much that I'd really like to use it more than once so that I can break up my ads. Maybe in a future release you could make it so that I could create more than one instance for my site? Hey Nico!

Great plug-in, but I like it so much that I’d really like to use it more than once so that I can break up my ads.

Maybe in a future release you could make it so that I could create more than one instance for my site?

]]>
By: Nico http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24871 Nico Wed, 16 Sep 2009 19:05:34 +0000 http://blogio.net/blog/?p=244#comment-24871 Looks good to me in both FF and IE. Try clearing your cache and history in FF. I have had similar problems with some other site, where my ISP was serving me a cached version of images. If that is the case, maybe give it a day and the problem should fix itself. The page is created by the code on the server, so there can be no difference between what FF and IE see, also the output of the script is a simple link and image, nothing special. Looks good to me in both FF and IE. Try clearing your cache and history in FF. I have had similar problems with some other site, where my ISP was serving me a cached version of images. If that is the case, maybe give it a day and the problem should fix itself.
The page is created by the code on the server, so there can be no difference between what FF and IE see, also the output of the script is a simple link and image, nothing special.

]]>
By: Luis http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24870 Luis Wed, 16 Sep 2009 18:40:06 +0000 http://blogio.net/blog/?p=244#comment-24870 Hi Nico. That was what i thought but no... If you want to check it for yourself please visit http://www.desaparezca.net/blog2 with both navigators (iexplorer and firefox). There is only one ad, at the right panel, is called Ads!. Thanks in advance. Hi Nico.

That was what i thought but no… If you want to check it for yourself please visit http://www.desaparezca.net/blog2 with both navigators (iexplorer and firefox). There is only one ad, at the right panel, is called Ads!.

Thanks in advance.

]]>
By: Nico http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24869 Nico Wed, 16 Sep 2009 18:18:01 +0000 http://blogio.net/blog/?p=244#comment-24869 Luis, your problem sounds like a local cache problem to me. Try reloading the page in firefox by pressing [ctrl] + [F5] Luis, your problem sounds like a local cache problem to me. Try reloading the page in firefox by pressing [ctrl] + [F5]

]]>
By: Luis http://blogio.net/blog/2009/09/14/geo-targeting-your-ads-with-ad-buttons/comment-page-1/#comment-24867 Luis Wed, 16 Sep 2009 16:32:59 +0000 http://blogio.net/blog/?p=244#comment-24867 Hi! Thanks in advance for this awesome plugin. I have a strange problem, i'm using wordpress 2.8.4 and ad buttons 1.7, when i visit the website with iexplorer the ad image is visible but with firefox (3.5.3) the ad image dont show up. ¿Any idea? Hi!

Thanks in advance for this awesome plugin. I have a strange problem, i’m using wordpress 2.8.4 and ad buttons 1.7, when i visit the website with iexplorer the ad image is visible but with firefox (3.5.3) the ad image dont show up. ¿Any idea?

]]>