elyfrank Posted May 1, 2009 Share Posted May 1, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/156455-monitor-backlink-script/ Share on other sites More sharing options...
Maq Posted May 1, 2009 Share Posted May 1, 2009 - What doesn't work about it? - Errors? What happens? Please provide more information. - Please use tags to format code. Quote Link to comment https://forums.phpfreaks.com/topic/156455-monitor-backlink-script/#findComment-823804 Share on other sites More sharing options...
elyfrank Posted May 1, 2009 Author Share Posted May 1, 2009 It doesn't show anything. It supouse to show a report if the link exist or not. You can see it working here. http://www.finalwebsites.com/demos/php_back_link_checker.php Maybe I am missing something. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/156455-monitor-backlink-script/#findComment-823831 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.