只要修改curl.php 文件,增加几行代码就可以了,但是要达到无验证码的要求,需要尽量多找问问服务器的IP
隐患: 问问服务器IP 有可能无效,需要定时检查IP 有效性
<?
$isfun=’curl’;
echo curl(‘http://wenwen.soso.com’);
function curl($openurl)
{
global $isfun;
if($isfun=="curl"){
$hostlist = array(‘113.108.81.226′,’113.108.81.225’); // 尽量多找wenwen.soso.com 的IP,我们不依赖DNS解析,直接连到问问服务器
$x = mt_rand(0, count($hostlist) – 1);
$host = $hostlist[$x];
$openurl = str_replace(‘wenwen.soso.com’,$host,$openurl);
//echo $openurl;
$ch = curl_init($openurl);
$user_agent = "Baiduspider+(+http://www.baidu.com/search/spider.htm)";
curl_setopt($ch, CURLOPT_URL, $openurl);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Host:wenwen.soso.com’)); //这是加header的
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, ‘http://wenwen.soso.com/’);//
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
$file = curl_exec($ch);
curl_close($ch);
}
elseif($isfun=="fopen"){
$file=open($openurl);
}
else{ echo "<script>alert(‘你的空间不支持本程序,谢谢使用’);window.close();</script>";}
return $file;
}
?>