【发布时间】:2013-01-08 21:08:20
【问题描述】:
我正在运行下面的代码,它的作用是使用 curl 获取网页。我的问题是当它获取网页时,它没有从网站获取 cookie。
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ''.$stuff_link[0].'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, false);
$html = curl_exec($ch);
curl_close ( $ch );
echo $html;
我尝试了一些方法,但都没有奏效。
【问题讨论】:
-
我看到那个帖子,厌倦了它不起作用
-
请将代码更新为您尝试/使用的代码
标签: php