为什么我不能通过php';卷发?

为什么我不能通过php';卷发?,php,forms,Php,Forms,发送所有需要的字段,但未能正确提交。编写html表单进行测试-如果在浏览器中执行,则一切正常:目标脚本可能需要存在特定的cookie,或者引用者与脚本位于同一域中 $ua_s = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'; $c = curl_init($the_url); curl_setopt($c, CURLOPT_RETURNTRANSFER

发送所有需要的字段,但未能正确提交。编写html表单进行测试-如果在浏览器中执行,则一切正常:

目标脚本可能需要存在特定的cookie,或者引用者与脚本位于同一域中

 $ua_s = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14';
 $c = curl_init($the_url);
 curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($c, CURLOPT_USERAGENT, $ua_s); 
 curl_setopt($c, CURLOPT_POST, true);
 curl_setopt($c, CURLOPT_POSTFIELDS, $post_string);
 $cont = curl_exec($c);
 curl_close($c);