且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用PHP Simple HTML DOM解析器抓取动态数据

更新时间:2023-02-26 10:24:26

我知道您需要jqgrid中包含的动态数据.为此,您可以使用发布URL作为响应,以提供数据.

I understand that you need the dynamic data that comes in the jqgrid. For that you can use post URL which in response gives the data.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sheriffclevelandcounty.com/p2c/jqHandler.ashx?op=s");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, array(
'rows'=>10000, //Here you can specify how many records you want
't'=>'ii'
    ));
$output = curl_exec($ch);
curl_close($ch);
echo "<pre>";
print_r(json_decode($output));