Originally published at: http://www.sitepoint.com/creating-an-anti-adblock-plugin-for-wordpress/
In this tutorial, we will create a WordPress plugin that can disable the website for users using AdBlock or display alternative ads to AdBlock users from the same domain as the website.
This plugin can be useful if your website is completely dependent on ads for generating revenue and where users consume a high amount of resources. For example, a video sharing site may want to ban a site from playing videos or display alternative ads for AdBlock installed users. One such example is TED.com, as shown above. You can see TED.com requests you to unblock ads for their site.
How Does AdBlock Work?
AdBlock maintains a list of various advertising network domain names and a list of advertising specific keywords.
AdBlock works by blocking image, iframe, script and Flash HTTP requests that match known advertiser domain or advertiser specific keywords that are on their list. After the requests are blocked, it also changes the CSS properties of the blocked HTHML elements to hide them.
AdBlock allows you to expand on what can be blocked by adding filters.