title: How do I extract this value using PHP Dom
body: <p>I do have html file this is just a prt of it though...</p>
  
  <pre><code>&lt;div id="result" &gt;
      &lt;div class="res_item" id="1" h="63c2c439b62a096eb3387f88465d36d0"&gt;
          &lt;div class="res_main"&gt;
              &lt;h2 class="res_main_top"&gt;
                  &lt;img 
                      src="/ff/gigablast.com.png" 
                      alt="favicon for gigablast.com" 
                      width=16 
                      height=16
                      /&gt;&amp;nbsp;
                  &lt;a 
                      href="http://www.gigablast.com/" 
                      rel="nofollow"
                      &gt;
                      Gigablast
                  &lt;/a&gt;
                  &lt;div class="res_main"&gt;
                      &lt;h2 class="res_main_top"&gt;
                          &lt;img 
                              src="/ff/ask.com.png" 
                              alt="favicon for ask.com" 
                              width=16 
                              height=16
                              /&gt;&amp;nbsp;
                          &lt;a 
                              href="http://ask.com/" rel="nofollow"
                              &gt;
                              Ask.com - What&amp;#039;s Your Question?
                          &lt;/a&gt;....
  </code></pre>
  
  <p>I want extract only url address (for example: <code>http://www.gigablast.com</code> and <code>http://ask.com/</code> - there are atleast 10 urls in that html) from above using PHP Dom Document..I know up to this but dont know how to move ahead??</p>
  
  <pre><code>$doc = new DomDocument;
  $doc-&gt;loadHTMLFile('urllist.html');
  
  $data = $doc-&gt;getElementById('result');
  </code></pre>
  
  <p>then what?? this is inside tag hence I cant use <code>$data-&gt;getElementsByTagName()</code> here!!</p>