tags:

views:

121

answers:

2

I receive POST request at my PHP script and would like to forward this post call to another script using POST too. How to do this? I can use cURL if it's required for this action.

+5  A: 
Nathan Adams
Have you tried this before? With the version of CURL I use, this will send the fields in "multipart/form-data", not a regular post.
ZZ Coder
I have never tried it before, but the PHP documentation does do a good job of documenting the functionality.
Nathan Adams
+2  A: 

Do this,

curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($_POST));
ZZ Coder
This did the trick! Thank you. http_build_query() is necessary, otherwise it won't work.
acme