schlitt.info - php, photography and private stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Tobias Schlitt :Date: Thu, 27 Nov 2008 18:00:29 +0100 :Revision: 2 :Copyright: CC by-nc-sa ================================= Finally: Services_Trackback 0.5.0 ================================= :Description: I finally managed to upload the next release of Services_Trackback (which is a generic class for sending and receiving trackbacks). The most important new feature for this version is integrated spam checking. Services_Trackback now implements a flexible API to add spam detection modules to a trackback using I finally managed to upload the next release of `Services_Trackback`__ (which is a generic class for sending and receiving trackbacks). The most important new feature for this version is integrated spam checking. `Services_Trackback`__ now implements a flexible API to add spam detection modules to a trackback using .. __: http://pear.php.net/package/Services_Trackback/download/ .. __: http://pear.php.net/package/Services_Trackback :: $trackback->createSpamCheck(); $trackback->addSpamCheck(); $trackback->removeSpamCheck(); $trackback->checkSpam(); Spam checks in Services_Trackback are simple classes which implement the API of Services_Trackback_SpamCheck (abstract class). This allows you to simply define custom spam checkings and use them in combination with predefined ones. The following example creates 3 (predefined) spam checks and runs them in the order Wordlist, SURBL, DNSBL (priority). If one spam check determies spam, the process stops and $trackback->checkSpam() returns true, else false is returned: :: // Add SURBL spamcheck with a priority of 1 (0 is the highest) $trackback->createSpamCheck('SURBL', array(), 1); // Add Wordlist spamcheck with option minmatches set to 2 and priority 0 (default) $trackback->createSpamCheck('Wordlist', array('minmatches' => 2)); // Manually create a DNSBL spamcheck and add it with priority 3 $dnsbl = Services_Trackback_SpamCheck::create('DNSBL'); $trackback->addSpamCheck($dnsbl, 3); // Finally check for spam if (true === $trackback->checkSpam()) { // spam discovered } The following (built-in) spam checks are available so far: - **Wordlist**: Checks different elements of a trackback using a list of words (predefined "bad word" list from PEARWeb). - **Regex**: Checks different elements of a trackback against a list of PCREs. - **DNSBL**: Checks the host the trackback was sent from against 1 or more DNS blacklists. - **SURBL**: Extracts the links from different trackback elements and checks them against 1 or more SURBLs. To install and try Services_Trackback simply do a :: pear install Services_Trackback-0.5.0 The actual PEAR package is packaged with a package.xml and a package2.xml, which allows you to utilize the amazing new features of PEAR 1.4. If you installed the package using 1.4 you can install packages needed for autodiscovery features (automatically discover the trackback URI of a blog entry) by typing :: pear install --alldeps Services_Trackback-0.5.0#autodiscover If you want to use DNSBL/SURBL spam check modules, you will have to install the neccessary features with :: pear install --alldeps Services_Trackback-0.5.0#dnsbl I beg everyone out there for **feedback** regarding the package (especially the developers of well-known weblog applications like Serendipity), it's facilities and it's API. Please comment on this blog entry! My wish would be to have Services_Trackback adopted by those applications to generate a single point of development for the trackback feature (which would be a benefit for all user, of course). For a complete list of features and a list of interessting links please refer to the extended version of this entry. --------------------------------- Services_Trackback 0.5.0 features --------------------------------- - Sending and receiving of trackbacks following the MT trackback specifications. - Generation of autodiscovery code for your websites (allowing weblog software to discover your trackback URI automatically). - Autodiscovering of trackback URIs (from URLs), supporting extended features like the following of HTTP redirects. - Generating valid trackback responses (success and failure reports). - Integrated spam checking using predefined and/or custom modules. Predefined modules are: - *Wordlist*: The wordlist filter checks elements of a trackback (configurable, by default title and excerpt) against a list of "bad words" (configurable, predefined one per default) and determines spam when a given number of hits (configurable, 1 per default) is reached. The comparison function is also configurable, by default a case-insensitive strpos() is used. - *Regex*: Give this spam check 1 or more Perl compatible regular expression(s) (PCRE) and it will check different elements (by default title, excerpt and blogname) against your regex list. The delimiters and modifier to use are configurable, a standard regex (containing the words from wordlist) is included by default. - *DNSBL*: This spam check utilizes Net_DNSBL to check the host which sent the trackback against 1 or more DNS black lists. - *SURBL*: SURBL (Spam URI realtime black list) is a fairly new technology of checking URL hosts from links inside trackbacks against a blacklist. The SURBL spam check extracts URLs from different elements of a trackback (by default title, excerpt and url) and checks them against 1 or more SURBL. - Configurable strictness regarding MT trackback specifications (e.g. URL match strictness). - Fully unit tested! ----- Links ----- - `Main page`__ - `Download`__ - `CVS`__ - `Announcement of 0.4.0`__ - `PEAR Proposal`__ - `MT Trackback specification`__ - `MT Introduction to trackbacks`__ .. __: http://pear.php.net/package/services_trackback/ .. __: http://pear.php.net/package/Services_Trackback/download .. __: http://cvs.php.net/pear/Services_Trackback/ .. __: /opensource/blog/0309_services_trackback_let_your_site_get_tracked_back.html .. __: http://pear.php.net/pepr/pepr-proposal-show.php?id=217 .. __: http://www.sixapart.com/pronet/docs/trackback_spec .. __: http://www.movabletype.org/trackback/beginners/ .. Local Variables: mode: rst fill-column: 79 End: vim: et syn=rst tw=79 Trackbacks ========== - Fighting trackback spam on PEARWeb on Mon, 30 May 2005 16:36:11 +0200 in Tobias Schlitt - Weblog Trackback spammers only needed a couple of weeks to discover PEARWeb's new trackback feature for their purposes. Of course I had to do something against that, which sadly lasted very long because I've been much too busy. Last week I finally managed to rel - Services_Trackback - Thoughts on trackback spam on Fri, 24 Jun 2005 16:35:32 +0200 in Tobias Schlitt - Weblog A few weeks ago I announced the release of Services_Trackback 0.5.0, which has a new module system for integrating spam protections into your trackback mechanisms. While the most easy filter (the bad word list) worked quite well for the first time frame, Comments ======== - Jochen at Wed, 25 May 2005 00:22:07 +0200 Services_Services is a very nice PEAR class. Thank you Tobias! Although the documentation could be more detailed, or lets better say: could be more existant. ;) The example is comprehensible but some more detailed documentation (at least the code docs with phpdoc) could make Services_Trackback even bette. - aamir at Tue, 05 Oct 2010 20:06:45 +0200 Honestly, its a good move to educate overseas Customers with such information, so that he is fully equipped to take it further without any loss of time, thereafter. R - karakalem at Sun, 12 Dec 2010 21:21:51 +0100 Resimlerinizi karakalem cizdirmek istiyorsanız güzel bir site hem ucuz hem cabuk 1 günde teslimat karakalem fotograf isterseniz tam aradıgınız yer sevdiklerinize güzel bir dogum gunu evlilik gunu yada özel günlerinizde supriz bir hediye vermek isterseniz tam aradıgınız yer. karakalem