Press "Enter" to skip to content

PHP对html的解析库

simple_html_dom

$contents = $mMyDom->get_myContent($url, $cookiePath);
        $mDom = $mMyDom->str_get_html($contents);
        $arrLi = $mDom->find('.prolist' , 0)->children;
        //仅仅采集类型和品牌
        if ($cType) {
            foreach($arrLi as $mLi) {
                if($mLi->tag == 'li') {
                    $dataA = $mLi->find('a',0);
发表评论