On Wed, 1 Jun 2011, Ali Asghar Toraby Parizy wrote:

I need to tell something to the user before starting download.
something like "Your download will begin in a moment..." . So header
couldn't help me. If I try to echo anything header doesn't work!

Couldn't you just do an HTML redirect?

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <html>
      <head>
      <title>File Download</title>
      <meta http-equiv="REFRESH"
      content="10;url=http://www.example.net/download";></HEAD>

      <BODY>
      <P>Your download will start in a few seconds.</P>

      <P>If your download fails to start automatically,
      <A HREF="http://www.example.net/download";>click here</A>.</P>
      </BODY>
      </HTML>

Of course, this is the resulting HTML you want to produce (or something like it). You'll obviously get PHP to echo the appropriate URL.

This approach has the benefit that it'll work on anything. My prefered browser does not support javascript, so you look me out of your site if you use it.

Geoff.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to