A URL filter needs a list of URLs of undesired web content. Such a list is referred to as a URLFilterDatabase.
There is a free database that can be downloaded from the website of the University of Toulouse. A large commercial database is available from URLfilterDB.
See ufdbGuard and SquidGuard.
One page links to URLFilterDatabase:
lib/main.php:944: Notice: PageInfo: Cannot find action page