Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] fetching POSTed file


Hello all,

I'm coding a PHP script that is supposed to present an HTML form to
the user, where he can upload a file. However, the form target is a
webpage outside of my domain (I really don't have access to it). On
normal usage, the uploaded file is processed by this remote script
(the form target), and a result page is generated containing a link
for downloading the file back.
I was thinking about building a script that actually used this as a
backend system. I believe it would have to be able to POST the file to
the remote script, parse the response page returned to me and get the
link to my file's name, and then download it to my own server (where
my PHP script is running). The last two steps seem fairly easy.
However, I'm just not sure how can I post a file to a PHP script on a
server I run, make it upload (again?) to the remote script, capture
the response and fetch the file.
Any ideas or starting points? Thanks in advance.


-- 
Julio C. Ody
http://rootshell.be/~julioody

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/SS/CC d@ s: a? C++(+++) ULB+++$ P++++ L+++$ !E W++(+++) N+ !o K- !w O- M
V- PS+ PE Y+ PGP++(-) t 5 X R+ tv-- b++ DI-- D+ G++ e h r+ y++*
------END GEEK CODE BLOCK------