PHP preg_match() 获取javascript内容

PHP preg_match() get javascript content

我正在做一个数据抓取项目 我需要从 html 页面

中的脚本标签中提取一些数据
<script type="text/javascript">
jQuery(document).ready( function(){
    new Equator.dataTable.loadEQDataTable( '33F6AC0950569B89A6D81D719B651143', '/proxy/ajaxproxy.cfc?method=process&event=property.getWorkflowByTask&marshalType=dataTable&sListColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&nTargetID=17801&nIsOpen=2&sEventType=form,form_html,rfi', '9', 'asc', 'true', 'true', 'index.cfm?event=property.getWorkflowByTask&sListColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&sListLabels=Task,Address,City,State,Zip,Status,Role,Servicer,Opened,Due/Completed&sListExcelColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&sListExcelLabels=Task,Address,City,State,Zip,Status,Role,Servicer,Opened,Due/Completed&bExcel=true&nTargetID=17801&nIsOpen=2&sEventType=form,form_html,rfi&iSortCol_0=9&sSortDir_0=asc', '', '25', 'false', '',false, true, '');
    });
</script>

我需要提取其中

/proxy/ajaxproxy.cfc?method=process&event=property.getWorkflowByTask&marshalType=dataTable&sListColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&nTargetID=17801&nIsOpen=2&sEventType=form,form_html,rfi', '9', 'asc', 'true', 'true', 'index.cfm?event=property.getWorkflowByTask&sListColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&sListLabels=Task,Address,City,State,Zip,Status,Role,Servicer,Opened,Due/Completed&sListExcelColumns=EVENT_NAME,ADDRESS_1,CITY,STATE,POSTAL_CODE,status_value,ROLE_DISPLAY,LENDERNAME,OPEN_DATE,DUEDATE&sListExcelLabels=Task,Address,City,State,Zip,Status,Role,Servicer,Opened,Due/Completed&bExcel=true&nTargetID=17801&nIsOpen=2&sEventType=form,form_html,rfi&iSortCol_0=9&sSortDir_0=asc

您可以通过以下方式获取第二个参数:

preg_match_all("/'(.*?)'/", $script, $m);
echo $m[1][1];