Jump to content

monitor backlink script


elyfrank

Recommended Posts

Hi Guys,

I copied a script to monitor backlinks but I can't make it work.

This is the script:

-----------------------------------------------------------

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

}

?>

---------------------------------------------------------------

And this is the form I use. In this page:http://www.flyawaytrip.com/link_checker.php

---------------------------------------------------------------

<form method="post" action="link.php" style="margin-top:20px;">

    <div>

  <label for="remote">Enter a valid target URL (target website) <br /></label>

  <input name="remote" type="text" id="remote" value="" size="50" />

 

</div>

<div>

  <label for="my_link">Enter here the URL you want to search inside the html code of the target website<br /></label>

  <input name="my_link" type="text" id="my_link" value="" size="75" />

</div>

<div>

  <input type="submit" name="Submit" value="Check!" />

</div>

 

  </form>

-----------------------------------------------------------------

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/156455-monitor-backlink-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.