Back link checker

Status
Not open for further replies.

roadrunner

Active Member
600
2011
127
0
Hi can someone point me in he right direction so im able to create a little script that will check back links are active ?

I run a directory which requires a link back to the directory or their site gets removed.

Problem is it takes hours of clicking to check my link is still displayed on the sites.

Is there a way to make this simple ?

Thanks
RR
 
2 comments
PHP:
<?php
foreach ($domain as $d) {
  $content = file_get_contents($d); // where $d is the url
  if (stristr($content, "your url here")) {
    // all good
  }else{
    echo $d . ' does not have a backlink' . PHP_EOL;
  }
}

It's really basic what ive written above, but it should be ok for the first version :P

Add curl multi exec in the next version with auto emailing, ...
 
The code in the previous reply is the most simple solution, but maybe you should also check if it's actually a link (url inside an <a href="" tag), that it's not set to nofollow, etc.
 
Status
Not open for further replies.
Back
Top