使用CURL提取页面数据

时间:2012-03-26 11:45:54

标签: php curl

  

可能重复:
  How to scrape a javascript site using PHP, CURL

我有一个存储在服务器上的网页,我想从该网页中提取数据,这个网页有我想用php中的CURL提取的类。

我怎样才能实现这一目标?

更新 mycode的..

 $ch = curl_init() or die('cURL not available');
    curl_setopt($ch, CURLOPT_URL, 'xxxxxxxxxx.php');
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $options);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  //to suppress the curl output 
    $html = curl_exec($ch);
    curl_close($ch);

解决

对于我使用Simple DOM PARSER PHP的解决方案。感谢帮助过的人。

此致

0 个答案:

没有答案
相关问题