You don't have to make the user wait for confirmation.

What you could do if you wanted to be sure to tell the user if the
connection failed or not, is to have him give his email addy for
confirmation. When the file move is done, make a call to mail().

Once you've gotten the file from the user, display a confirmation that the
file was recieved and will now be perminately stored.

Stick your file move code, ftp or whatever, into a function. Then use
http://us.php.net/manual/en/function.register-shutdown-function.php to call
the function.

If the function does it's job properly, have it mail the user with success.
Otherwise you probably want to have it send the error to yourself, or email
the user that the file didn't work.


Only do this all once you are reasonably certain that there are no bugs in
the code. Otherwise if there is an error, you'll never know it!


--
Plutarck
Should be working on something...
...but forgot what it was.


"David Minor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hmm, good idea, but the only access I have to the remote machine is ftp.
> Can't put a script on it.  I am getting the feeling that I actually have
to
> move the file(s) from the user's machine to my server and then transfer
them
> to the FTP site?  I was hoping there would be a way to transfer directly
> from the user to the remote FTP site.  But now that I think about it, I
> guess probably not.  so the trick would be to let the form upload them to
> /tmp and then move them to the remote site.  Takes twice as long. :(  I'm
> talking about 10-15 MB at a time while the user waits for confirmation.
> That's a long wait (even moving it once).  Any ideas?
>
> dm
>
> Plutarck wrote:
> >
> > Or you could just put a PHP script on the target server that will take
the
> > input via GET and store the data for you. So you don't even have to use
FTP.
> >
> >
> > --
> > Plutarck
> > Should be working on something...
> > ...but forgot what it was.
> >
> >
> > "Lindsay Adams" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> sure.
> >>
> >> keep track of the files on the server drive, then open a connection
using
> >> fopen() and fputs the contents of each file.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to