Is there something such as an Adblock API?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Is there something such as an Adblock API?

Post by lovelf »

I'm building a website scraper and would want to remove all ads from the websites that I scrap, is there something such as an Adblock API? the famous Adblock web browser extension that removes all ads from a webpage.
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: Is there something such as an Adblock API?

Post by lovelf »

How to write a PHP function that uses that algorithm and keeps all ads away from my website scrapper:

Code: Select all

function getMatchingFilter1(S, F)
  for each filter in F
    if (filter matches S)
      return filter
    end if
  end for

  return null
end function
http://adblockplus.org/blog/investigati ... algorithms
Post Reply