(.*)<\/title>/i',$page,$ar)) $title = $ar[1]; if (preg_match('/$title, 'description'=>$description, 'keywords'=>$keywords, ); return $res; } // _parseTags //get text from html function getOnlyText($text) { $text=strtolower($text); $text=str_replace("\n\r"," ",$text); $text=str_replace("\n"," ",$text); $text=str_replace("\r"," ",$text); //erasing scripts $tmp=$this->my_preg_match_all('',$text); foreach($tmp as $k=>$v) $text=str_replace($v,'',$text); //erasing styles $tmp=$this->my_preg_match_all('',$text); foreach($tmp as $k=>$v) $text=str_replace($v,'',$text); //erasing links because we don't count text from hrefs $tmp=$this->my_preg_match_all('',$text); foreach($tmp as $k=>$v) $text=str_replace($v,'',$text); //erasing options from select $tmp=$this->my_preg_match_all('',$text); foreach($tmp as $k=>$v) $text=str_replace($v,'',$text); $tmp=$this->my_preg_match_all('<','>',$text); foreach($tmp as $k=>$v) $text=str_replace($v,'',$text); //print_r($tmp); /*$text=str_replace('>','> ',$text); $text=str_replace('<',' <',$text); $text = strip_tags($text); $text = str_replace("