PHP parser for Adblock Plus filters

v0.1.7 2019-10-20 09:09 UTC

This package is auto-updated.

Last update: 2024-05-20 20:43:58 UTC


Build Status Scrutinizer Code Quality Code Coverage


To learn about Adblock Plus filter syntax check these links:

  1. Get filter rules somewhere: write them manually, read lines from a file downloaded from EasyList, etc.:

    $rules = [
  2. Create AdblockRules instance from the rules array:

    use Limonte\AdblockParser;
    $adblockParser = new AdblockParser($rules);
  3. Use this instance to check if an URL should be blocked or not:

    $adblockParser->shouldBlock(""); // true
    $adblockParser->shouldBlock(""); // false

Related projects