fix3r Posted March 31, 2007 Share Posted March 31, 2007 Lets say I have a website, that has a form on it. How would I go about using php to insert things into the form and push submit and see what it outputs. The website I want to submit to isn't on my server it would be a different designated site. It doesn't involve cookies or anything like that I just need to search for some text on the submitted page. How would I do this in curl? I'm very clueless because all the tutorials I see has to do with cookies and such and I don't need that. Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/ Share on other sites More sharing options...
fert Posted March 31, 2007 Share Posted March 31, 2007 $post=array("name"=>"value","foo"=>"bar"); $c=curl_init("http://somesite.com/form.php"); curl_setopt($c,CURLOPT_POST,true); curl_setopt($c,CURLOPT_POSTFIELDS,$post); $result=curl_exec($c); Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/#findComment-218705 Share on other sites More sharing options...
fix3r Posted March 31, 2007 Author Share Posted March 31, 2007 Would it matter if the page that has the form is lets say a ".psp"? Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/#findComment-218706 Share on other sites More sharing options...
fix3r Posted April 1, 2007 Author Share Posted April 1, 2007 $post=array("name"=>"value","foo"=>"bar"); $c=curl_init("http://somesite.com/form.php"); curl_setopt($c,CURLOPT_POST,true); curl_setopt($c,CURLOPT_POSTFIELDS,$post); $result=curl_exec($c); This doesn't seem to work. What else would I have to do? Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/#findComment-218951 Share on other sites More sharing options...
fert Posted April 1, 2007 Share Posted April 1, 2007 are you sure you have the form processing page not the form page? Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/#findComment-218959 Share on other sites More sharing options...
fix3r Posted April 1, 2007 Author Share Posted April 1, 2007 are you sure you have the form processing page not the form page? I don't really know the difference. The form processing page is the same as the form page :| Link to comment https://forums.phpfreaks.com/topic/45052-curl-form-submition-help/#findComment-218961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.