title: PHP multiple file_get_contents on data of previous file_get_contents
body: <p>I found this code to check for links on an URL.</p>
  
  <pre><code>&lt;?php
  $url = "http://example.com";
  $input = @file_get_contents($url);
  $dom = new DOMDocument();
  $dom-&gt;strictErrorChecking = false;
  @$dom-&gt;loadHTML($input);
  $links = $dom-&gt;getElementsByTagName('a');
  foreach($links as $link) {
     if ($link-&gt;hasAttribute('href')) {
        $href = $link-&gt;getAttribute('href');
        if (stripos($href, 'shows') !== false) {
           echo "&lt;p&gt;http://example.com" . $href . "&lt;/p&gt;\n";
        }
     }
  }
  
  ?&gt;
  </code></pre>
  
  <p>Works good, it shows all the links that contains 'shows'.
  For example the script above find 3 links, so i get:</p>
  
  <pre><code>&lt;p&gt;http://example.com/shows/Link1&lt;/p&gt;
  &lt;p&gt;http://example.com/shows/Link2&lt;/p&gt;
  &lt;p&gt;http://example.com/shows/Link3&lt;/p&gt;
  </code></pre>
  
  <p>Now the thing i try to do is to check those urls i just fetched also for links that contains 'shows'.</p>
  
  <p>To be honest i'm a php noob, so i don't know where to start :(</p>
  
  <p>Regards,
  Bart</p>