porta325 Posted July 13, 2007 Share Posted July 13, 2007 <?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.website.com", "http://www.mywebsite.com")) echo "link exists"; ?> what is wrong with my piece of script here? It should do something but it does nothing. Quote Link to comment 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.