class spider { var $minlength=3; var $minoc=2; function getUrl($url) { $handle = fopen($url, "r"); if($handle) { $contents = ''; while (!feof($handle)) {$contents .= fread($handle, 8192);} return $contents; } return false; } //parse tags function (extracting title,description , keywords of the page) function _parseTags($page) { //$page=strtolower($page); //$page=str_replace("\n"," ",$page); //$page=str_replace("\r"," ",$page); $title = $description = $keywords = ''; if (preg_match('/