Forum Moderators: coopster

Message Too Old, No Replies

PHP Download Script & Confirmation Page.

         

ucs308

10:09 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



I have a download page, that uses a form to submit which file a user wants to download. I do this rather than using a link because I want to get download stats in realtime. After the user clicks the submit button, I want to display a confirmation page with instructions on how to install the file they have downloaded, AND I want to kick of the download.

What do people suggest?

panic

10:36 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



And you want to kick off the download? What does that mean?

-panic

ucs308

10:52 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



When I say "kick off the download", I mean i want the file download dialog box to appear at the client end.

I am trying to replicate the behaviour of the following URL using PHP.

www.bluemitt.com/downloads/prd_1/WRSQV2.1/WRSQV21_download.asp

If you click download a thank-you page will display and then the download dialog will open.

[edited by: jatar_k at 3:02 am (utc) on Aug. 22, 2003]
[edit reason] delinked [/edit]

panic

11:00 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



You could do that without PHP. Look at that specific URL's JavaScript they use to do that.

-panic

ucs308

12:23 am on Aug 22, 2003 (gmt 0)

10+ Year Member



OK. But is it possible to do it with PHP?

panic

1:00 am on Aug 22, 2003 (gmt 0)

10+ Year Member



If by that you mean use PHP to print JavaScript... then yes.

-panic

ucs308

3:21 am on Aug 22, 2003 (gmt 0)

10+ Year Member



I am trying to avoid Javascript. The site is currently built using PHP, XML, XSL, and CSS. I have not used any javascript.

Jeff_H

10:48 pm on Aug 23, 2003 (gmt 0)

10+ Year Member



You could do something like this:

<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.yourdomain.com/files/<? echo($filename);?>">

And add this for user agents that don't support the above:

<A HREF="http://www.yourdomain.com/files/<? echo($filename);?>">Click here if your download doesn't start</A>