curl-and-php
multipart/form-data posts
Date: Fri, 28 Sep 2001 09:59:47 -0600
I've spent about 3 hours trying to find a solution to this, and managed
to come up with nothing helpful.
In a three-tier system, I have a frontend page that presents a file
upload form. Users select a file to upload. The form's action is to
recall the page, which will upload the file. The recalled page will now
contain the form variable containing the uploaded file's name in the
local tmp directory.
Now I need to re-send the form to the backend page for processing. How
do I fake a multipart/form-data post in php?? What I've already
learned: CURLOPT_HTTPPOST would seem to be an answer, but it seems
unsupported in php; using CURLOPT_POSTFIELDS with name=@filename doesn't
seem to work... perhaps because it's urlencoded.
Has nobody ever needed to do this, or am I really missing something??
Tks in advance.
Pete.
-- Pete James, AdvanisReceived on 2001-09-30