title: PHP Search for a string in remote webpage
body: <p>I am trying to write a script with PHP where it'll open up a text file ./urls.txt and check each domain for a specific word. I am really new to PHP.</p>
  
  <p>Example: 
  Look for the word "Hello" in the following domains.
  List:
  Domain1.LTD
  Domain2.LTD
  Domain3.LTD</p>
  
  <p>and just simply print out domain name + valid/invalid.</p>
  
  <pre><code>&lt;?PHP
  $link = "http://yahoo.com"; //not sure how to loop to read each line from a file.
  $linkcontents = file_get_contents($link);
  
  $needle = "Hello";
  if (strpos($linkcontents, $needle) == false) {
  echo "Valid";
  } else {
  echo "Invalid";
  }
  ?&gt;
  </code></pre>