I have a code to detec backlink from yahoo and google like this :
function google_backlink($uri)
{
$uri = trim(eregi_replace('http://', '', $uri)); $uri = trim(eregi_replace('http', '', $uri));
$url = 'http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link:'.$uri.'&filter=0';
$v = file_get_contents_curl($url);
preg_match('/of about \<b\>(.*?)\<\/b\>/si',$v,$r);
preg_match('/of \<b\>(.*?)\<\/b\>/si',$v,$s);
if ($s[1]!=0) {
return $s[1];
} else {
return ($r[1]) ? $r[1] : '0';
}
}
//get yahoo inlink/backlink
function yahoo_inlink($uri)
{
$uri = trim(eregi_replace('http://', '', $uri)); $uri = trim(eregi_replace('http', '', $uri));
$url = 'http://siteexplorer.search.yahoo.com/advsearch?p=http://'.$uri.'&bwm=i&bwmf=s&bwmo=&fr2=seo-rd-se';
$v = file_get_contents_curl($url);
$data1=explode("Inlinks (", $v);
//echo htmlentities(var_dump($data1));
$data2=explode(")", $data1[1]);
//return ($r[1]) ? (integer)str_replace(",", "",trim($r[1])) : (integer)'0';
return ($data2[0]) ? (integer)str_replace(",", "",trim($data2[0])) : (integer)'0';
}
that's just for yahoo and google. How to get backlink from MSN, bing, ask, gigablast, altavista, teoma.
Please tell me the solutions.