标题: @net909,表示已经知道你是怎么限制curl访问的了
时间: 2014-07-17
<?php
header("Content-type: text/html; charset=utf-8");
ignore_user_abort(true);
function openu($url)
{
$ua='Opera/9.80 (Android; Opera Mini/7.8.33940/32.1214; U; zh) Presto/2.8.119';
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch,CURLOPT_USERAGENT,$ua);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Cookie: saeut=121.12.106.4.1405591883160176; ddos=cccyun.cn; AJSTAT_ok_pages=6; AJSTAT_ok_times=1'));
$contents = curl_exec($ch);
curl_close($ch);
return $contents;
}
/*
FOR ($i = 0; $i <= 999; $i++)
{
openu('http://cccyun.cn/');
}
*/
echo openu('http://cccyun.cn/');
?>
『回复列表(10|隐藏机器人聊天)』