使用php获取任何特定域的所有baklink域

使用php获取任何特定域的所有baklink域,php,hyperlink,dns,alexa,Php,Hyperlink,Dns,Alexa,嗨,我被困在这里了 我需要一个有任何特定域的反向链接的所有域的列表。 有人能帮我吗? 请给我提供一些链接或一些api程序来获得所有的反向链接。 我在alexa上搜索过,他们提供了反向链接的详细信息,但没有任何api请求。 我得到了一个php脚本来获得任何域的排名,它拥有该域的所有反向链接计数,但我需要同时获得所有域的名称 $url="msn.com"; $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat

嗨,我被困在这里了 我需要一个有任何特定域的反向链接的所有域的列表。 有人能帮我吗? 请给我提供一些链接或一些api程序来获得所有的反向链接。 我在alexa上搜索过,他们提供了反向链接的详细信息,但没有任何api请求。 我得到了一个php脚本来获得任何域的排名,它拥有该域的所有反向链接计数,但我需要同时获得所有域的名称

   $url="msn.com";
$xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$url);
$rank=(int)$xml->SD[1]->POPULARITY->attributes()->TEXT;
$web=(string)$xml->SD[1]->POPULARITY->attributes()->URL;
$backlink=(int)$xml->SD[0]->LINKSIN->attributes()->NUM;
echo $web." has Alexa Rank ".$rank." has backlink: ".$backlink;

希望这对你有点帮助。。我是从互联网世界找到的

function check_back_link($remote_url, $your_link) {
  $match_pattern = preg_quote(rtrim($your_link, "/"), "/"); 
  $found = false;
  if($handle = @fopen($remote_url, "r")){
    while(!feof($handle)){
      $part = fread($handle, 1024);
      if(preg_match("/<a(.*)href=[\"']".$match_pattern."(\/?)[\"'](.*)>(.*)<\/a>/", $part)){
        $found = true;
        break;
      }
    }
    fclose($handle);
  }
  return $found;
}
使用MSN更新

function msn_backs($url){ 
    $site = fopen('http://search.live.com/results.aspx?q=link%3A'.urlencode($url),'r'); 
    while($cont = fread($site,1024657)){ 
        $total .= $cont; 
    } 
    fclose($site); 
    $match_expression = '/<h5>Page 1 of (.*) results<\/h5>/Us'; 
    preg_match($match_expression,$total,$matches); 
    return $matches[1]; 
}
函数msn\u backs($url){
$site=fopen('http://search.live.com/results.aspx?q=link%3A'.urlencode($url),'r');
而($cont=fread($site,1024657)){
$total.=$cont;
} 
fclose($站点);
$match_expression='/第1页,共页(.*)results/Us';
preg_match($match_expression,$total,$matches);
返回$matches[1];
}

在您无法获得API链接之前,您可以使用$\u服务器[“HTTP\u REFERER”];这也将充分利用你..我认为没有免费的反向链接API了,因为雅虎已经关闭了自己的API。问题是创建反向链接数据库是一个非常昂贵的过程,因为您必须对整个网络进行爬网。所以,供应商出售它的钱。我已经编辑了我的php代码部分。你能告诉我如何获得所有的链接或反向链接详细使用api。。。请帮助我,我需要所有的链接在其他网站的msn.com链接的详细信息
function msn_backs($url){ 
    $site = fopen('http://search.live.com/results.aspx?q=link%3A'.urlencode($url),'r'); 
    while($cont = fread($site,1024657)){ 
        $total .= $cont; 
    } 
    fclose($site); 
    $match_expression = '/<h5>Page 1 of (.*) results<\/h5>/Us'; 
    preg_match($match_expression,$total,$matches); 
    return $matches[1]; 
}