Return to Snippet

Revision: 26265
at April 22, 2010 02:48 by donkeykong


Initial Code
//// (PHP 4 >= 4.3.0, PHP 5) 

$haystack = file_get_contents('http://lvgloves.com/testing/'); 
$needle = '<a target="_blank" title="PHP and Flash Development" href="http://www.vectorflash.net">Vectorflash.net</a>';

if( stristr($haystack,$needle) != FALSE )
{
	echo 'There is a match.';
}

Initial URL


Initial Description
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.

Initial Title
reciprocal link check

Initial Tags
url

Initial Language
PHP