home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / antispam.inc < prev    next >
Encoding:
Text File  |  2003-03-16  |  822 b   |  36 lines

  1. <?php
  2. /////////////////////////////////////////////////////////
  3. //    
  4. //    include/antispam.inc
  5. //
  6. //    (C)Copyright 2000-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
  7. //
  8. //    This file is part of IlohaMail. IlohaMail is free software released 
  9. //    under the GPL license.  See enclosed file COPYING for details, or 
  10. //    see http://www.fsf.org/copyleft/gpl.html
  11. //
  12. /////////////////////////////////////////////////////////
  13.  
  14. /********************************************************
  15.  
  16.     PURPOSE:
  17.         Provide spam filtering functions.
  18.     COMMENTS:
  19.         EXPERIMENTAL.  Currently not used.
  20.  
  21. ********************************************************/
  22.  
  23. Function isSpam($text){
  24.     $level=0;
  25.     if (stristr($text,"!")){
  26.         $level++;
  27.     }
  28.     $a=explode(" ",$text);
  29.     $last=count($a)-1;
  30.     $num=(int)$a[$last];
  31.     if (($last>2)&&($num>1000))    $level++;
  32.     
  33.     return $level;
  34. }
  35.  
  36. ?>