I need a script that allows me to enter multiple URL's and check whether there is a backlink to my site as well as if its dofollow or nofollow. I'm sure there is a script out there to do this. Could someone please help me. Thanks.
hi, you can use the script below. <?php 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); $pattern = "/<a(.*)href=[\"']".$match_pattern."(\/?)[\"'](.*)rel=[\"']([A-Za-z- ]+)[\"'](.*)>(.*)<\/a>/"; if (preg_match($pattern, $part, $result)) { $found = true; break; } } fclose($handle); } $return['found'] = $found; $return['result'] = $result; return $return; } // EXAMPLE USAGE: $return = check_back_link("http://www.anothersite.com", "http://www.yoursite.com"); if($return['found'] == TRUE): echo '<p><strong>Status:</strong> Link exists</p>'; echo '<p><strong>Rel:</strong> '.$return['result'][4].'</p>'; else: echo 'link doesn\'t exist'; endif; ?> PHP:
you can use an old php link directory script, it has a database, just stuff all the links in there as reciprocal and run a check. http://www.phplinkdirectory.com/articlescript/phpLD_version_2.php