English 中文(简体)
Get all baklink domains of any particular domain using php
原标题:

Hii to all I am stuck here I need a list of all domains which having backlinks of any particular domain. Can anyone help me for this? Please provide me some link or some api procedure to get all the backlink. I had searched on alexa they provided the linksin backlink detail but not have any api request for that. I got a php script to get the rank of any domain it is having the all backlink count of that domain But I need the all the domains name at the same time.

   $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;
问题回答

Hope this will be little bit useful to you.. I found it from internet world.

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;
}

An example of the function in use.

if(check_back_link( http://www.google.com , http://www.yahoo.com )){
  echo  link found ;
}else{
  echo  link NOT found ;
};
// this prints  link NOT found , unfortunately...

Updated With 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]; 
}

Backlink ads, catch Google keywords and increase safe backlinks to your site, to help you promote your site and strengthen it in search engines

Backlink store





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签