tags:

views:

67

answers:

3

I want to duplicate a HTTP POST request from a form which includes file elements, as if there were just 2 action attributes with different targets on the form element.

So far I have not been able to do this successfully with cURL for one reason or another, so I'm looking for alternatives (that don't use the cURL library what-so-ever, therefore no pecl_http)

A: 

There is http_request, but that is a PECL extension. I think you're better off using cURL, as that is typically available in PHP installs.

George Marian
A: 

you could use an external curl, or lwp-request or even maybe wget

lordspace
A: 

It's possible, but it's not easy.

You'd have to either manually craft a "multipart/form-data" request, or rewrite the Content-type header using Apache so as to prevent the file data from being parsed and the use $HTTP_RAW_POST_DATA or php://input. How to do both has been answered in SO before, but I'm not being able to find any of the questions.

Artefacto