使用PHP的CURL模拟POST采集
这个函数很不错,curl函数中的header还可以加入随机UA等功能防屏蔽,以后改改做自己的采集类! /** QQ群:223494678 函数:模拟post得到所有分页的页面信息 参数: string $EVENTARGUMENT string $VIEWSTATE string $EVENTVALIDATION string $EVENTTARGET 返回: string /**/ function getn($EVENTARGUMENT = "", $VIEWSTATE = "", $EVENTVALIDATION = "", $EVENTTARGET = "pager"){ $args = array(); if($EVENTARGUMENT){ $args = array( '__EVENTTARGET'=>$EVENTTARGET, '__EVENTARGUMENT'=>$EVENTARGUMENT, '__VIEWSTATE'=>$VIEWSTATE, '__EVENTVALIDATION'=>$EVENTVALIDATION, '__VIEWSTATEENCRYPTED'=>'', 'search$txtFundName='=>'', 'search$txtFundManger'=>'', 'search$ddlFoundationDateOperater'=>'1', 'search$txtFoundationDate'=>'', 'search$dltFundType$ctl01$chkFundType'=>'on', 'search$dltFundType$ctl01$chklFundChildType$0'=>'on', 'search$dltFundType$ctl01$chklFundChildType$1'=>'on', 'search$dltFundType$ctl01$chklFundChildType$2'=>'on', 'search$dltFundType$ctl01$chklFundChildType$3'=>'on', 'search$dltFundType$ctl01$chklFundChildType$4'=>'on', 'search$chklFundStatus$0'=>'on', 'search$ddlFundOrg'=>'0', 'search$txtFundOrgName'=>'', 'search$ddlStatisticDateOperater'=>'1', 'search$txtStatisticDate'=>'', 'search$radlStatisticMode'=>'1' ); } $user_agent = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535....