'') { $content = getURL($url); $content = preg_replace("/^(.*?)(.*?)<\/body>(.*?)$/is", "\\2", $content); $content = preg_replace("/]*?>.*?<\/script>/is", "", $content); $content = strip_tags($content); $content = html_entity_decode($content); $content = preg_replace("/&[^;]*?;/", " ", $content); } //or the text else if ($text<>'') { $content = $text; } else { $content = "no text nor url"; } $content = preg_replace("/(,|\"|\.|\?|:|!|;| - )/", " ", $content); $content = preg_replace("/\n/", " ", $content); $content = preg_replace("/\s\s+/", " ", $content); $content = split(" ",$content); $words = Array(); foreach ($content as $word) { $word=strtolower($word); if (!isset($words["$word"])) $words["$word"] = 1; else $words["$word"]++; } unset($words[""]); if ($remove=="yes") { //50 most used words $a = split(" ","the of and to a in that it is was i for on you he be with as by at have are this not but had his they from she which or we an there her were one do been all their has would will what if can when so"); foreach ($a as $banned) unset($words[$banned]); } /* header("Content-Type: text/plain"); foreach ($words as $word => $value) { echo "$word\n"; } exit; */ ?> Analys.icio.us <?php if ($url<>'') echo "for ".$url; ?> $value) { $zindex=$max - $value; if (rand(0,1)) $vertical="top"; else $vertical="bottom"; if (rand(0,1)) $horizontal="left"; else $horizontal="right"; $position="$horizontal:".rand(0,50)."%; $vertical:".rand(0,50)."%"; $size=round(7+($value/$max) * 63) . 'px'; $color=255-round(($value/$max) * 155); echo "
"; echo ""; echo ucfirst($word); echo "
\n"; } function getURL($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $store = curl_exec ($ch); $content = curl_exec ($ch); curl_close ($ch); return $content; } ?>