- To: Julio Cesar Ody <julioody@xxxxxxxxx>, slug <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] fetching POSTed file
- From: Rob Sharp <rob.sharp@xxxxxxxxx>
- Date: Tue, 8 Feb 2005 16:04:29 +1100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=NqH4cc9bcOUIs0G4XFfraI2tZuM5bm5z1R28AhDa9vcIpOEzHpvfWbm0WveJ8ZrCZxVLMwAkTOw+wLvqrBP7EO6ivb1L95JTc5V+DO9KlT6/GLNbzlcgW4nTAz/Y0MBzwW6jGjBvGNhVissWaax38ryNMpKq5IXEeUh7JQ8xhiI=
- Reply-to: rob@xxxxxxxxxxx
Hi
A good starting point would be the CURL library. You could POST the
data to the other system, and screen-scrape the response by capturing
it into a variable.
http://au2.php.net/curl
A little busy at the mo, so cant do you any sample code!
HTH
Rob.
On Tue, 8 Feb 2005 15:26:07 +1100, Julio Cesar Ody <julioody@xxxxxxxxx> wrote:
> 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------
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
--
Rob Sharp
e: rob@xxxxxxxxxxx
w: quannum.co.uk
j: rob.sharp@xxxxxxxxxx