执行部分:
urlencode($phone),'area'=>urlencode($area));$GLOBALS['cookie_file'] = $cookie_jar;require_once('./functions.php');$url = 'http://zsjs.kaiwind.com/kf/html/index.html';// vget($url);//exit();$browsers = array ( "Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding" => "gzip, deflate","Accept-Language"=>"zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3","Cache-Control"=>"max-age=0","Connection"=>"keep-alive","Content-type"=>"application/x-www-form-urlencoded",//"Cookie"=>"CNZZDATA199524=cnzz_eid%3D713570903-1381646309-http%253A%252F%252Fzsjs.kaiwind.com%26ntime%3D1381738758%26cnzz_a%3D0%26retime%3D1381738758499%26sin%3D%26ltime%3D1381738758499%26rtime%3D1","Host"=>"zsjs.kaiwind.com","User-Agent"=>"Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0" );$url = 'http://zsjs.kaiwind.com/kf/kfcheck.php';dump(vpost($url,$data));exit();$url = 'http://zsjs.kaiwind.com/kf/kfsub.php';dump(vpost($url,$data));?>
页面返回的结果:
string(90) "
400 Bad request
Your browser sent an invalid request.
"
回复讨论(解决方案)
cookie放在最后一行、?
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
把这句注释掉试试
本文原创发布php中文网,转载请注明出处,感谢您的尊重!