$delsoegning ='http://www.google.com/search?q='.$urlord.'&num='.$_POST['antal_hits'].'&lr=lang_da&ie=UTF-8&oe=UTF-8';
$fp = fopen ($delsoegning, 'r') ;
while (!feof ($fp))
{
$buf = trim(fgets($fp, 4096));
$pos = strpos($buf,'<p class=g>');
$antal = strpos($buf,'</b> of about <b>');
if($antal !== false)
{ $tal3[1]=0;
$tal = explode('</b> of about',$buf);
//'explode' deler en streng med en streng
$tal2 = explode('<b>',$tal[1]);
$tal3 = explode('</b>',$tal2[1]);
//$tal3 indeholder antallet af hits
}
}
//her slutter tæller
echo ' <a
href="http://www.google.com/search?q='.$urlord.'&lr=lang_da&ie=UTF-8&oe=UTF-8"
target="_blank">'.$ordformer[1].'</a> ('.$tal3[0].'); ';