Re: Wait for FTP
| From: | Jason Lavigne | Date: | Fri, 01 Dec 2000 02:18:35 +0000 |
| Subject: | Re: Wait for FTP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28037@lists.php.net to get a copy of this message | ||
Well it would not be PHP that actually does this for you, you would use the
<meta> tags in HTML.
Here is what you would want to do.
Page 1: Ask user what file they want.
In PHP or any scripting language you like produce Page 2 to have a <meta>
redirect to the actual FTP file, plus include an "If download does not
start" link.
The <meta> redirect will redirect the page to the FTP server, but because
the FTP server responds with a file stream the user will still see the
"Please wait for the download to start..." page but they will also be
presented with a "Save file" window. The <meta> tag redirect also allows you
to set a delay, say 5 seconds. You could also use JavaScript and the
window.location.href function to do the same but adding a timer to it is
much more difficult that using the <meta> redirect trick.
Hope it helps.
Jay
----- Original Message -----
From: "Robert Covell" <rcovell@rolet.com>
To: "Php-General" <php-general@lists.php.net>
Sent: Thursday, November 30, 2000 9:05 AM
Subject: [PHP] Wait for FTP
> How in php do you force an FTP session when the user clicks to down load
it.
> I am not referring to simply clicking a link and getting the file. But
> clicking a link, going to another page that says: "Please wait for the
> download to start, if it doesn't within 5 seconds press the link below".
> This is what many game servers do when getting something like "Counter
> Strike". I am not sure how to have the user wait for the FTP in a new
page.
> Can anyone shed some light here?
>
> -Bob
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>