Braintique.com header
Left Navigation Bar

The Googleplex Blog: Harold Davis's Blog


May 02, 2005

Code for Stripping Google Ads from RSS

In a previous entry in the Googleplex Blog and on O'Reilly I mentioned that Google was beta testing contextual AdSense style ads in RSS and Atom feeds. One company immediately placing these ads in its RSS feeds is Weblogs, Inc., whose Prez Jason Calacanis is annoyed with "folks who take our feeds and republish them without premission to their websites... these folks wrap our content in ads..."

At least in the current implementation, it's easy to remove these ads in a feed display application because they are implemented as HTML tables, which really have no business in syndication feeds. Here's a PHP function that uses regular expression pattern matching to remove all table rows from each item description in a feed:



Here's the Weblogs Unofficial Google Weblog RSS feed (note the embedded Google ads in item descriptions), and the same feed displayed using this code with ads stripped on Syndication Viewer. Posted by Harold Davis at May 2, 2005 04:36 PM

Search Engine Optimization







RSS 2.0 Syndication feed

Syndication Viewer

Our Web host:
IX WebHosting



Food for Your Brain! Get a Barticle! Questions Answered Books for You What We Can Do For You Contact Us Brain Food Questions Answered Books for You What We Can Do For You Frequently Asked Questions About Us Google Research Photoshop Wi-Fi and Wireless Networking The Natural Way to Write