I've used Perl to rectify this. I have set up Apache on my local machine, and enabled mod_rewrite with a rule like this in my httpd.conf:
Now, in /etc/hosts, I have a list of servers who only serve ad content, similar to this:RewriteEngine on RewriteRule ^/.*$ /blank.cgi
Now, when a request for any URL at one of the above servers is made by my browser, it is diverted to my local http server, and my custom CGI script. The CGI script makes a connection to the ad server, figures out whether the content is supposed to be text or an image, and then generates a blank page or transparent gif for my browser to use in place of the ad. It closes the connection before actually downloading the ad.127.0.0.1 adfu.blockstackers.com 127.0.0.1 ad.doubleclick.net 127.0.0.1 m.doubleclick.net
The net result: I don't have to waste bandwidth on banner ads, and the site operator still has a "GET" request for the ad in their logs, so they still get paid (assuming they get paid for page views instead of click-throughs)
I am posting the code as a reply to this message.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Benevolent Ad Filter
by httptech (Chaplain) on Jun 08, 2000 at 01:30 UTC | |
by floopy (Sexton) on Jun 09, 2000 at 02:04 UTC | |
by httptech (Chaplain) on Jun 09, 2000 at 02:23 UTC | |
|
RE: Benevolent Ad Filter
by httptech (Chaplain) on Jun 09, 2000 at 02:31 UTC | |
by Corion (Patriarch) on Jun 10, 2000 at 14:29 UTC | |
|
RE: Benevolent Ad Filter
by merlyn (Sage) on Jun 08, 2000 at 05:03 UTC | |
by httptech (Chaplain) on Jun 08, 2000 at 06:18 UTC | |
by merlyn (Sage) on Jun 09, 2000 at 02:40 UTC | |
by httptech (Chaplain) on Jun 09, 2000 at 02:57 UTC | |
by Anonymous Monk on Jun 08, 2000 at 16:31 UTC | |
by httptech (Chaplain) on Jun 08, 2000 at 18:38 UTC | |
by Anonymous Monk on Jun 08, 2000 at 21:35 UTC | |
|
RE: Benevolent Ad Filter
by swiftone (Curate) on Jun 08, 2000 at 21:57 UTC |