title: how to get a list of links in a webpage in PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4461105/parse-website-for-urls">Parse Website for URLs</a>  </p>
  </blockquote>
  
  
  
  <p>How do I get all the links in a webpage using PHP?</p>
  
  <p>I need to get a list of the links :-</p>
  
  <p><a href="http://www.google.com" rel="nofollow noreferrer">Google</a></p>
  
  <p>I want to fetch the <em>href</em> (<a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a>) and the <em>text</em> (Google)</p>
  
  <p>-------------------situation is:-</p>
  
  <p>I'm building a crawler and i want it to get all the links that exist in a database table.</p>