有一个页面需要登录才能读取,我已经用 crul 模拟登录成功获取了页面内容
页面的数据是表格,我想用 simple_html_dom 来分析 获取需要的数据
但是 curl 使用的 curl_exec
simple_html_dom 使用的是 file_get_html
curl_exec 获取到的数据,没办法直接在 simple_html_dom 中使用啊
比如 $content = file_get_html(网址)
foreach($content->find('a') as $row)
echo $row;
这是正常的
-----------------------------------------------------------
但是 $content = curl_exec(网址)
foreach($content->find('a') as $row)
echo $row;
这是没有内容的
怎么办?
页面的数据是表格,我想用 simple_html_dom 来分析 获取需要的数据
但是 curl 使用的 curl_exec
simple_html_dom 使用的是 file_get_html
curl_exec 获取到的数据,没办法直接在 simple_html_dom 中使用啊
比如 $content = file_get_html(网址)
foreach($content->find('a') as $row)
echo $row;
这是正常的
-----------------------------------------------------------
但是 $content = curl_exec(网址)
foreach($content->find('a') as $row)
echo $row;
这是没有内容的
怎么办?