通过curl发布数据不起作用,但html很好

时间:2014-03-10 16:24:24

标签: php html curl

我在html:

<form action="address" method="post" id="login_form">
    <input type="text" class="text-input captcha-input" id="captcha_input" name="captcha"/>            
    <input class="button" type="submit" id="submit" value="Sign In">
</form>

一切都很好 但在Curl

$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, 'captcha=dawdewad');
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
echo $response = curl_exec( $ch );
curl_close($ch);

不要发布验证码! 帮帮我PLZ

0 个答案:

没有答案