Hi there
please i need your help in this class
i just got this class and this class is a ( Did you mean class... It fetches results from google site. i did uesed it in my site and it worked great in English only . In my site I am using UTF-8 unicde ؛When the results comes from google it comes as an unknown Characters .. I think the results comes from google as a Windows-1256 ..
I need your help converting the results coming from google ( I am not sure what unicode is it!!) To UTF-8 unicode .
This is my class i am using
function DidYouMean($keywords){
$content = file_get_contents('http://www.google.com.sa/search?hl=ar&q='.str_replace(' ', '+', $keywords).'');
preg_match('#<div id=res>(.*?)<div>#', $content, $matches);
$match = str_replace('Did you mean:', 'Did you mean?:', str_replace(' ', '', strip_tags($matches[1])));
if($match == '' || $match == ' '){
return 'none';
}else{
return $match;
}
}
$result = DidYouMean($_GET['search']);
$this-> m_didum= '<font color="#FF0000">'.$result.'';