[ Index ] |
|
Code source de GeekLog 1.4.1 |
[Code source] [Imprimer] [Statistiques]
File: SLVbase.class.php Spam Link Verification (SLV) Base Class Copyright (C) 2006 by the following authors: Author Dirk Haun dirk AT haun-online DOT de
Poids: | 214 lignes (6 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
SLVbase:: (5 méthodes):
SLVbase()
CheckForSpam()
checkWhitelist()
getLinks()
prepareLinks()
SLVbase() X-Ref |
Constructor |
CheckForSpam($post) X-Ref |
Check for spam links param: string $post post to check for spam return: boolean true = spam found, false = no spam |
checkWhitelist(&$links) X-Ref |
Check whitelist Check against our whitelist of sites not to report to SLV. Note that URLs starting with $_CONF['site_url'] have already been removed earlier. param: array &$links array of URLs from a post return: void ($links is passed by reference and modified in place) |
getLinks($comment) X-Ref |
Extract links Extracts all the links from a post; expects HTML links, i.e. <a> tags param: string $comment The post to check return: array All the URLs in the post |
prepareLinks($comment) X-Ref |
Extract only the links from the post SLV has a problem with non-ASCII character sets, so we feed it the URLs only. We also remove all URLs containing our site's URL. Since we don't know if the post is in HTML or plain ASCII, we run it through getLinks() twice. param: string $comment The post to check return: string All the URLs in the post, sep. by linefeeds |
Généré le : Wed Nov 21 12:27:40 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |