I want to submit a form with captcha using curl and php
I get the captcha using curl and get it showed to the user and he enters the captcha
Now I submit the form with the captcha again using the curl but the page says you have entered invalid captcha how to solve this problem?

These codings I am using to submit the captcha

$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL,$url);
curl_setopt($ch2,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch2,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch2,CURLOPT_COOKIE,1);
curl_setopt($ch2,CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($ch2,CURLOPT_AUTOREFERER,1);
curl_setopt($ch2,CURLOPT_USERAGENT,"ArabyBot (compatible; Mozilla/5.0; GoogleBot; FAST Crawler 6.4; http://www.araby.com;)");
curl_setopt($ch2, CURLOPT_POST, 1);
curl_setopt($ch2, CURLOPT_POSTFIELDS,$valuesubmit);
curl_setopt($ch2,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch2,CURLOPT_CONNECTTIMEOUT,"120");
$result1= curl_exec ($ch2);
echo $result1;
curl_close ($ch2);

    Capthcas are there specifically to stop programmatic form submissions. For that reason, I am closing this thread as we do not need to support spammers here.

      Write a Reply...