Share this page

# Example: web_add_filter

The following example uses web_add_filter to exclude URLs with a path prefix of /Images/Upload. Since the call only applies to the next action function, the filter does not apply to the second call to web_url. All URLs with matching criteria will not be excluded.

    // Call to web_add_filter only applies to the next action function
    web_add_filter("Action=Exclude", "PathPrefix=/Images/Upload", LAST );

    web_url("www.knanas.com", "URL=http://www.knanas.com/", "Resource=0",
         "RecContentType=text/html", "Referer=", "Snapshot=t1.inf",
         "Mode=HTML",
         EXTRARES,
         "Url=/images/netaction_icon.gif", ENDITEM,
         "Url=http://frontpage.knanas.com/Images/Upload/Commerce323.jpg", ENDITEM,

         // Will be excluded as it matches the path prefix criteria
         "Url=http://frontpage.knanas.com/Images/Upload/Commerce134.gif", ENDITEM,

         // Will be excluded as it matches the path prefix criteria

         "Url=http://frontpage.knanas.com/Images/Upload/120_eminem-t55.jpg", ENDITEM,

         // Will be excluded as it matches the path prefix criteria

         "Url=http://frontpage.knanas.com/Images/Upload/153_gavre_sigar.jpg", ENDITEM,

         // Will be excluded as it matches the path prefix criteria

       "Url=http://realmedia.knanas.com/RealMedia/ads/Creatives/default/empty.gif",  ENDITEM,
         LAST );

    // Out of scope of web_add_filter function
    web_url("www.knanas.com", "URL=http://www.knanas.com/", "Resource=0",
         "RecContentType=text/html", "Referer=", "Snapshot=t1.inf", "Mode=HTML",
         EXTRARES,
         "Url=/images/netaction_icon.gif",
         ENDITEM,
         "Url=http://frontpage.knanas.com/Images/Upload/Commerce323.jpg",
         ENDITEM,

         // Will be included because the filter doesn't apply any more

         "Url=http://frontpage.knanas.com/Images/Upload/Commerce134.gif", ENDITEM,

         // Will be included

         LAST );

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: