Please enter url";break;} $url_backup=$url; if(strpos($url,'http://')===false) $url='http://'.$url; $ultimate = &New ultimate; $ultimate->minoc=$_POST[minoc]; $ultimate->minlength=$_POST[minlength]+1; $page=$ultimate->getUrl($url); if($page===false) { } else { //extracting meta-tags : title,keywords,description $tags=$ultimate->_parseTags($page); //extracting only text from html $text=$ultimate->getOnlyText($page); if($_POST[ikey]==1) $text=$text." ".$tags[keywords]; if($_POST[ides]==1) $text=$text." ".$tags[description]; //erasing stop words if($_POST[stopwords]==1) { $handle = fopen("stop_words.txt", "r"); while (!feof($handle)) { $buffer = fgets($handle, 4096); $buffer=" ".trim($buffer)." "; if(strlen(trim($buffer))>0) $text = ereg_replace(strtolower($buffer)," ",strtolower($text)); } fclose($handle); } //end erasing stop words //echo $text; //getting 1 word $nrWords=$ultimate->getNrWords($text); $res_counts_1=array(); $res_counts_1=$ultimate->getCounts($text); //getting 2 words $res_counts_2=array(); $res_counts_2=$ultimate->getCounts_2($text); //getting 3 words $res_counts_3=array(); $res_counts_3=$ultimate->getCounts_3($text); //output results table include 'results.php'; break; } } } include 'form.php'; include '../footer.php'; ?>