Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

Untitled

By: a guest on Feb 23rd, 2010  |  syntax: None  |  size: 0.61 KB  |  hits: 4,960  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. <?
  2. $overwords=$_POST[overwords];
  3. $letters=$_POST[letters];
  4. if($_POST){
  5.     $t=$_POST[txt];
  6.     $t=preg_match_all("#([a-zA-Z]{".$letters.",})#is",$t,$f);
  7.     foreach($f[0] as $w){
  8.         $w=strtolower($w);
  9.         $all[$w]++;
  10.     }
  11.     foreach($all as $key=>$val){
  12.         if($val>$overwords){
  13.             echo $key.'<br>';
  14.         }
  15.     }
  16. }
  17.  
  18. ?><form method=post><textarea rows="20" cols="70" name="txt"></textarea><br>
  19.     <input type="text" name="overwords" value="count of includings"><br>
  20.     <input type="text" name="letters" value="letters more than.."><br>
  21.     <br>
  22. <input type=submit></form>