views:

26

answers:

2

How can I go about seeing if a particular website has a specific link in its content? We have a situation where someone is not necessarily stealing our copyrighted content, but they are posting parts of it and linking to another site as the author and we're wanting to track each time they do this.

Basically what I need is something that will go to www.site_of_thieves.com/specific_page.php and search for www.second_site.com and report back on the number of matches found.

Any help would be appreciated.

+1  A: 

$cl> curl site.com | grep "the link"

Mr-sk
+2  A: 
$theivesSiteContent = file_get_contents("www.site_of_thieves.com/specific_page.php");

preg_match_all('/www.second_site.com/g', $theivesSiteContent, $matches);

print_r($matches);
Luca Matteis