PHP Backlink Checker

This function is usefull for peoples with a link directory where the links are stored inside a (MySQL) database. The PHP script is easy to use to find out if a reciprocal link still exists on the corresponding webpage. It takes care about the trailing slash in urls and can be used with (almost) every url. Inside the function is a check against a regular expression pattern and the result is a simple boolean. CODE from: http://www.finalwebsites.com
<?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); if (preg_match(“/<a(.*)href=[\"']“.$match_pattern. “(\/?)[\"'](.*)>(.*)<\/a>/”, $part)) { $found = true; break; } } fclose($handle); } return $found; } // example: //if (check_back_link(“http://www.web-tool.ws”, “http://www.fixwordpress.net”)) echo “link exists”; ?>

3 Responses to PHP Backlink Checker

  1. Thanks for codes but where is demo site address ?

  2. Buy Backlink says:

    thanks!You made some good points there. I did a search on the topic and found most people will agree with your blog.
    Thanks though, i’m glad some people share good stuff like this! It will greatly help me in my SEO activities.

  3. Swapnil says:

    One of the most important factors in Search Engine Optimization is the number of incoming links to your website, the relevance of the website linking to you, the anchor text used for the link, and the page ranking of the webpage linking to you. We have tried it and have found it very useful to increase our page rank on google. We are a tender information portal, http://www.tradereader.com. We used tenders as our anchor text. We suggest any site to try and increase the backlinks.

Leave a Reply

  • News
  • Popular
  • [+]

Copyright © 2010 | Powered by WordPress. Theme and Tech Support by FixWordpress