[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/antispam/model/ -> _antispam.funcs.php (sommaire)

This file implements Antispam handling functions. This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

Author: blueyed: Daniel HAHLER.
Author: fplanque: Francois PLANQUE.
Author: vegarg: Vegar BERG GULDAL.
Copyright: (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}.
License: http://b2evolution.net/about/license.html GNU General Public License (GPL)
Version: $Id: _antispam.funcs.php,v 1.2 2007/09/22 19:23:56 fplanque Exp $
Poids: 353 lignes (12 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 7 fonctions

  antispam_create()
  antispam_update_source()
  antispam_delete()
  antispam_check()
  antispam_report_abuse()
  antispam_poll_abuse()
  get_ban_domain()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

antispam_create( $abuse_string, $aspm_source = 'local' )   X-Ref
antispam_create(-)

Insert a new abuse string into DB

antispam_update_source( $aspm_string, $aspm_source )   X-Ref
antispam_update_source(-)

Note: We search by string because we sometimes don't know the ID
(e-g when download already in list/cache)

antispam_delete( $string_ID )   X-Ref
Pas de description

antispam_check( $haystack )   X-Ref
Check if a string contains abusive substrings

Note: Letting the database do the LIKE %% match is a little faster than doing in it PHP,
not to mention the incredibly long overhead of preloading the list into PHP

return: string blacklisted keyword found or false if no spam detected

antispam_report_abuse( $abuse_string )   X-Ref
Pings b2evolution.net to report abuse from a particular domain.

param: string The keyword to report as abuse.
return: boolean True on success, false on failure.

antispam_poll_abuse()   X-Ref
Request abuse list from central blacklist.

param: boolean Display while fetching it?
return: boolean true = success, false = error

get_ban_domain( $url )   X-Ref
Get the base domain that could be blacklisted from an URL.

We want to concentrate on the main domain and we want to prefix it with either . or // in order not
to blacklist too large.

{@internal This function gets tested in _misc.funcs.simpletest.php}}

param: string URL or domain
return: string|false the pattern to match this domain in the blacklist; false if we could not extract the base domain



Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics