title: Parse external webpage and extract all URLs and link text from the content
body: <p>I want to parse external webpages and extract all URLs and link text from the content using PHP.</p>
  
  <p>For example,</p>
  
  <pre><code>$content="&lt;a href="http://google.com" target="_blank"&gt; google&lt;/a&gt; is very good search engine &lt;a href="http://gmail.com" target="_blank"&gt;Gmail &lt;/a&gt; is provided by google.
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>http//google.com      google 
  http//gmail.com     Gmail 
  </code></pre>
  
  <p>Suggestions are much appreciated!</p>