title: Writing a PHP script that open website's pages and stores page's content in variable
body: <p>I have been building a search-engine, but now I need a web crawler that in PHP that can crawl my website for it's content.</p>
  
  <p>I don't know if a web crawler / spider is the right word, but I was hoping and wondering if anyone could help me write a simple PHP script that opens all pages in a domain ending in .php or .html and takes the content in the pages and stores that in a variable as raw text. One variable per page.</p>
  
  <p>If anyone knows of a good and open source script that does this or can help me write one, please share or do so— I would greatly appreciate all and any help.</p>