reciprocal link check

/ Published in: PHP
Save to your folder(s)

I couldn't easily find an example of how to verify if someone added my link to their site while they added their link to a directory of mine. After some research, I found out how to search for a string remotely. I have simplified the steps so that you get the gist of it and can modify the code as necessary.

Copy this code and paste it in your HTML
  1. //// (PHP 4 >= 4.3.0, PHP 5)
  3. $haystack = file_get_contents('');
  4. $needle = '<a target="_blank" title="PHP and Flash Development" href=""></a>';
  6. if( stristr($haystack,$needle) != FALSE )
  7. {
  8. echo 'There is a match.';
  9. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.