Parsing title and link from html page
<p>I wanna get the title and link from this html page :</p>

<pre><code>&lt;div class="gs_r"&gt;
    &lt;h3 class="gs_rt"&gt;
        &lt;span class="gs_ctc"&gt;[BOOK]&lt;/span&gt;
        &lt;a href="http://example.com" onmousedown="return scife_clk(this.href,'','res','1')"&gt;titleA&lt;/a&gt;
    &lt;/h3&gt;
    &lt;div class="gs_ggs gs_fl"&gt;
        &lt;a href="http://exampleA.pdf" onmousedown="return scife_clk(this.href,'gga','gga','1')"&gt;
</code></pre>

<p>How can I get them?</p>

<p>here's the code :</p>

<pre><code>&lt;?php
include 'simple_html_dom.php';
$url = 'http://example.com';
$html = file_get_html($url);
//get the first link
foreach($html-&gt;find('span[class=gs_ctc]')as $Link){
echo $link;
}
foreach($html-&gt;find('div[class=gs_ggs gs_fl]')as $docLink){
echo $docLink;
}

?&gt;
</code></pre>
