Extract a specific URL from a list of URLs using PHP

I have a list of more than 100 Webpages where I need to find a specific URL from. For now, I have to manually scrub through each and every page to find the URL and make a note of them. Is there a way to find this?

Answer:

this should do, place your links in a file called links.txt and replace example.com in the code with the url you want to be searched for, and then execute
<?php

$file = "links.txt";
$theURL = "example.com";
$webPagesURLs = file($file);
foreach($webPagesURLs as $webPageURL){
    $webPageContent = @file_get_contents($webPageURL);
    if(strpos($webPageContent, $theURL) !== false ){
        print "$theURL Found in <a href=$webPageURL > $webPageURL </a><br>\n";
    }
}

?>