Login   Register  
PHP Classes
elePHPant
Icontem

found out that google doesnt use the tag topstuff anymore

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Google - Did You Mean  >  All threads  >  found out that google doesnt use the tag topstuff anymore  >  (Un) Subscribe thread alerts  
Subject:found out that google doesnt use the tag topstuff anymore
Summary:google doesnt support topstuff id because of instant search
Messages:1
Author:oshan
Date:2012-01-24 09:02:43
 

  1. found out that google doesnt use the tag topstuff anymore   Reply   Report abuse  
Picture of oshan
oshan
2012-01-24 09:02:51
heres a little fix :)
public function search($query){
$this->query = $query;
//MAKE ADDRESS
$resultado = file_get_contents(str_replace(array('#LANGUAGE#','#QUERY#'),array($this->lang,urlencode($this->query)),$this->search_addr));

// initialize DOM
$doc = new DOMDocument;
@$doc->loadHTML($resultado);

//var_dump($resultado);
$aTag = $doc->getElementByID('ires')->getElementsByTagName('div');

$this->correct = str_replace("Did you mean: ",'',$aTag->item(0)->nodeValue );
if($this->correct){return true;}
//RETURNS
return false;
}