时间:2021-07-01 10:21:17 帮助过:6人阅读
Curl file_get_contents
file_get_contents报错:取得content结果:".$content;?>
wen文问问ajaxsns吧
$ch = curl_init();curl_setopt($ch, CURLOPT_URL,'http://api.ajaxsns.com/api.php?key=free&appid=0&msg='.rawurlencode('我是谁').'?');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");//对方网站设置了cookiescurl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");//这2个选项是关键curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); $htmls = curl_exec($ch);curl_close($ch);echo $htmls;
我也抓不到 怎么回事啊 围观