why could i not submit the form via php's curl?

Posted by home on Stack Overflow See other posts from Stack Overflow or by home
Published on 2010-05-10T06:59:37Z Indexed on 2010/05/10 7:04 UTC
Read the original article Hit count: 242

Filed under:
|
 $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);

send all needed fields but fail to submit it properly. wrote html form to test - all is well if done so in browser:

© Stack Overflow or respective owner

Related posts about php

Related posts about form