private function extractDocumentsLink($html){
        $links = array();
        //preg_match_all("#<a\ href=\"(.*)\.pdf\"#", $html, $matches);
        preg_match_all("#<a\ href=\"(.*)\"#", $html, $matches);
        foreach($matches[1] as $f) {
            $pospdf = strpos($f,".pdf");
            if($pospdf !== false) {
                $f = substr($f, 0, $pospdf + 4);
                if (!$this->excludeLink($f)) {
                    $links[] = $f;
                }
            }
        }
        return $links;
    }
private function extractDocumentsLink($html){
        $links = array();
        //preg_match_all("#<a\ href=\"(.*)\.pdf\"#", $html, $matches);
        preg_match_all("#<a\ href=\"(.*)\"#", $html, $matches);
        foreach($matches[1] as $f) {
            $pospdf = strpos($f,".pdf");
            if($pospdf !== false) {
                $f = substr($f, 0, $pospdf + 4);
                if (!$this->excludeLink($f)) {
                    $links[] = $f;
                }
            }
        }
        return $links;
    }
private function extractDocumentsLink ( $ html ) { $ links = array ( ) ; //preg_match_all("#<a\ href=\"(.*)\.pdf\"#", $html, $matches);
 preg_match_all ( "#<a\ href=\"(.*)\"#" , $ html , $ matches ) ; foreach ( $ matches [ 1 ] as $ f ) { $ pospdf = strpos ( $ f , ".pdf" ) ; if ( $ pospdf !== false ) { $ f = substr ( $ f , 0 , $ pospdf + 4 ) ; if ( ! $ this -> excludeLink ( $ f ) ) { $ links [ ] = $ f ; } } } return $ links ; }
Parses the main page html to extract the links to pdf documents
@param $html   html content of the main page
@return array  Array containing all the pdf documents links
Parses the main page html to extract the links to pdf documents