No, it's not stupid - I don't know why you may need this but as long as you need it...

Anyway. It would be interesting to know what OS you're using on both ends of the connection. If they're both *nix machines, it's rather simple. You typically copy the uploaded file from the temporary location to their final destination on upload. You might as well copy them to a remote location instead using system calls, such as scp. Setting up scp to not require command line authentication is done as follows:

web_serv$ ssh-keygen -t rsa
web_serv$ scp .ssh/ remote_serv:
remote_serv$ cd ~; mkdir .ssh
remote_serv$ cat >> .ssh/authorized_keys2
remote_serv$ chmod -R go-rwx .ssh; rm
web_serv$ ssh webserver

(running as apache on both machines)

This is the cleanest method I can think of. There are lots of in-between solutions, but I guess the last resort (ugliest) solution would be having an Apache server on the receivng end as well, and using whatever method to send the files via HTTP (Curl, home grown function to build a POST request or one of the zillions of similar libraries freely available).

After all, you could even have the form on the web server directed to your local machine running Apache, and upon receiving the file you could perform a redirect via HTTP back to the web server.

Just my 2c.

Kenn Murrah wrote:
admitting in advance that this may be a REALLY stupid question ..

i've created a page for uploading files using PHP, and it works fine ... is
it possible to write that uploaded file to another drive, on another

for instance, my PHP pages are currently being hosted offsite ... would it
be possible to direct the uploaded pages to a box that's located at the
office? something like "" ???

thanks, and feel free to laugh at my question :-)

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to