Hi, I've used cURL for a long time, and submitting a POST form is a very basic use with curl. But, this time it didn't work and the only difference with the other ones is that this form (wich is by the way a very basic html form) doesn't send the data to the same page's header but sends it to another page like that : <form name="someform "action="other_page.php"> Code (markup): So what should I do to have the content of "other_page.php" after posting the data to the main page? Thank you for any help.
curl_setopt($ch, CURLOPT_URL, 'http://....other_page.php'); PHP: ...? Or CURLOPT_FOLLOWLOCATION if the form redirects to another page after submitting the form.
I've already tried these two options before and always nothing (for FOLLOWLOCATION I get the error of safe mode and it didn't work even when I disactivated it from my serv).
Set the URL as the action ie.. curl_setopt($ch, CURLOPT_URL, 'http://domain.com/other_page.php'); PHP: That should work, just make sure the the action is proceeded by the websites host/domain...(including any subdirectories)
Thank you all. The "http://domain.com" is mine so I just made a custom non-public php page just for the curl use with direct posting with action on the same page and it works.