Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.