using mime to read hidden extension in links
<p>I wanna crawl some academic search engine, for example this : <a href="http://scholar.google.com/scholar?hl=en&amp;q=internet&amp;btnG=&amp;as_sdt=1%2C5&amp;as_sdtp=" rel="nofollow">http://scholar.google.com/scholar?hl=en&amp;q=internet&amp;btnG=&amp;as_sdt=1%2C5&amp;as_sdtp=</a>
I wanna get the title, the url address of data that has pdf file only.
here's the code :</p>

<pre><code>require_once 'simple_html_dom.php';
$url = 'http://scholar.google.com/scholar?hl=en&amp;q=internet&amp;btnG=&amp;as_sdt=1%2C5&amp;as_sdtp=';
$html = file_get_html($url) or die ('');
foreach($html-&gt;find('h3[class=gs_rt] a') as $link1){
    foreach($link1-&gt;parent()-&gt;parent()-&gt;parent()-&gt;find('div[class=gs_md_wp]') as $link2){
        $docLink = $link2-&gt;first_child();
        $link = $docLink-&gt;href;
        $mime = mime_content_type($link);  
        if ($mime == 'application/pdf'){
           $title   = strip_tags($link1-&gt;plaintext);echo $title;
           $webLink = strip_tags($link1-&gt;href);echo $webLink;
           $pdfLink = strip_tags($link);echo $link;
        }
    }
}
</code></pre>

<p>but I get warning <code>Fatal error: Call to undefined function mime_content_type() in D:\AppServ\www\ekstension\try3.php on line 10</code>.</p>

<p>fyi, I've activated <code>extension=php_mime_magic.dll</code> in php.ini. what's wrong ? thanks</p>
