wucher wichtel: Problem gelöst - Danke!

Beitrag lesen

Hallo!

Ich hab's. Danke an alle, die mir geholfen haben. Für's Archiv stelle ich mal den Quelltext hier rein:

  
  class CheckString {  
  
    var $words = array('<a', '\[link', '\[url');  
    var $wordsLength;  
    var $i;  
    var $punkte = 0;  
  
    function wordsLength() {  
      $this->wordsLength = count($this->words);  
    }  
  
    function checkData($data) {  
      $this->wordsLength();  
      for($i = 0; $i < $this->wordsLength; $i++){  
        if( eregi($this->words[$i], $data)){  
          $this->punkte = $this->punkte + 1;  
        }  
      }  
  
    return "Ihr Eintrag enthält ".$this->punkte." von den ".$this->wordsLength." verbotenen Wörtern! Bitte löschen Sie diese.";  
  
    }  
  
  }  
  
  $text = "<a test test";  
  $check = new CheckString();  
  print $check->checkData($text);  

Nochmals Vielen Dank!

ciao, ww

--
Ein japanisch-deutsches Gedicht
sh:(  fo:|  ch:~  rl:(  br:>  n4:~  ie:%  mo:)  va:)  de:]  zu:)  fl:(  ss:|  ls:~  js:)