Johnny2 Posted September 13, 2013 Report Posted September 13, 2013 Hello, I can't figure out a few lines of cURL code. I have 3 files involved... File #1 will have a form that submits the form data (via POST) to FILE #2. File #2 receives the POST, automatically re-posts the exact same data to File #3, then continues to process some of the info the POST contained. File #3 receives the POST from File #2, and processes it normally (and this is where the USER should end up). What I can't figure out is the part (in file #2) that receives the POST then AUTOMATICALLY REPOSTS it. The cURL code that I have to work with doesn't seem to work so far. Here's what I have to work with: $url='File_number_3'; //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($_POST)); curl_setopt($ch,CURLOPT_POSTFIELDS,$_POST); //execute post $result = curl_exec($ch); //close connection curl_close($ch); Anyone know what I need to do with this code to simply get it to take the incoming POST, then re-submit it to File_number_3 ? Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now