sniperscope Posted May 11, 2010 Share Posted May 11, 2010 Hi gurus I have a tiny problem that i can not submit web form after receive confirmation page. Let make myself more clear. I have couple of web sites and i want to post data automatically. I wrote some php script which using cURL. The problem is my sites has confirmation page. So far, i can post data, get confirmation page but i dont know how to post confirmation page. All i can done with my php skill is below. Hopefully you guys help me or at least drive me to a solution with your comments. Regards $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://mysite.net/test/bbs.cgi?guid=ON"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_REFERER, "../english/index.html"); curl_setopt($ch, CURLOPT_POSTFIELDS, "subject=$_POST[subject]&FROM=$_POST[FROM]&mail=$_POST[mail]&MESSAGE=$_POST[MESSAGE]&bbs=english&time=1373480270&tepo=don&submit=Confirm"); $result = curl_exec ($ch); curl_close($ch); echo $result; Quote Link to comment Share on other sites More sharing options...
teamatomic Posted May 11, 2010 Share Posted May 11, 2010 What do you mean "post" the confirmation page. That should be your $result, which you are echoing. HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
sniperscope Posted May 11, 2010 Author Share Posted May 11, 2010 Dear teamatomic thank you very much for your reply. Let me explain step by step; 1 - my previous code auto submit form 2 - return result shows me confirmation page to make sure i have entered correct data through my browser (echo $result) 3 - There is another submit button (i entered correct value, please send it) 4 - here is my code stop... 5 - i want to submit that form too. but seems i can not with my code. please give me an idea if have any better solution. Regards Quote Link to comment Share on other sites More sharing options...
teamatomic Posted May 11, 2010 Share Posted May 11, 2010 Break that page apart and see where the action goes and if it uses some kind of token for confirmation then try sending the data to that instead of the first page, if that does not work then have a second piece of curl code to submit whatever you parse out of $result. HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
Sidneyka Posted April 27, 2015 Share Posted April 27, 2015 http://acheterviagrageneriqueenligne1.com/ viagra achat http://comprarviagragenerico25mg.com/ viagra generico http://acquistareviagragenericoonline.com/ prezzo viagra http://viagrakaufengenerika25mg.com/ kaufen viagra Quote Link to comment Share on other sites More sharing options...
nik_jain Posted April 27, 2015 Share Posted April 27, 2015 I don't understand you, but a couple of pointers... 1. curl can return the error, if any for the current request. check it if it helps: http://php.net/manual/en/function.curl-error.php . Similarly there is curl_info 2. The values being passed to POSTFIELDS should be urlencode'ed3. Referer doesn't seem right Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.