function getPagerank($url){ // start off with a random low PR $pagerank = rand(0, 3); $url2 = parse_url($url); if (strpos(strtolower($url2['host']), "google.com")) { $pagerank++; } else if (strpos(strtolower($url2['host']), "microsoft.com")) { $pagerank--; } require_once('XhtmlValidator.php'); $xhtml = fread(fopen($url, "r"), filesize($url)); if($XhtmlValidator->validate($xhtml) === true){ $pagerank *= .5; } // Sergey said good news sites have // lots of nested tables reg_match_all("/