title: How would I compare two text files for matches with PHP
body: <pre><code>$domains = file('../../domains.txt');
  $keywords = file('../../keywords.txt');
  </code></pre>
  
  <p>$domains will be in format of:</p>
  
  <pre><code>3kool4u.com,9/29/2013 12:00:00 AM,AUC
  3liftdr.com,9/29/2013 12:00:00 AM,AUC
  3lionmedia.com,9/29/2013 12:00:00 AM,AUC
  3mdprod.com,9/29/2013 12:00:00 AM,AUC
  3mdproductions.com,9/29/2013 12:00:00 AM,AUC
  </code></pre>
  
  <p>keywords will be in format of:</p>
  
  <pre><code>keyword1
  keyword2
  keyword3
  </code></pre>
  
  <p>I guess I would really like to do an array for keywords from a file and search each line of domains.txt for matches. Not sure where to start as I'm confused at the difference of preg_match, preg_match_all, and strpos and more or less when to use one over the other.</p>
  
  <p>Thanks ahead for the help.</p>