On Tue, May 31, 2011 at 8:49 PM, jean-baptiste verrey <
jeanbaptiste.ver...@gmail.com> wrote:

> gosh, I should have read before answering for the downloader thing.
> BUT you actually need javascript if you want to do it.
> You create an hidden iframe somewhere on your page, you give him the url of
> your file and pop it is downloaded, and you need simply to use javascript
> function setInterval to do that after a couple of seconds!
>

You do not need javascript to do this, or an iframe. Use a meta refresh tag.

http://en.wikipedia.org/wiki/Meta_refresh

Sometimes I miss the way the web was before javascript :/

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


On 31 May 2011 20:38, Ali Asghar Toraby Parizy
> <aliasghar.tor...@gmail.com>wrote:
>
> > Hi
> > thanks for your help jean
> > I've used this code before. But I want a little different thing.
> > 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!
> >
> > On Tue, May 31, 2011 at 10:01 PM, jean-baptiste verrey
> > <jeanbaptiste.ver...@gmail.com> wrote:
> > > it's made in JavaScript, by creating an iframe loading the file, but
> > their
> > > downloader might use something like a php file to force download such
> as
> > > <?php
> > > $filePath='/var/wwwblablah.zip';
> > > header('Content-type: application/octet-stream');
> > > header('Content-Disposition: attachment; filename="azipfile.zip"');
> > > readfile($filePath);
> > > ?>
> > >
> > > On 31 May 2011 18:02, Ali Asghar Toraby Parizy <
> > aliasghar.tor...@gmail.com>
> > > wrote:
> > >>
> > >> I want to build a web page for file auto download like cnet.download.
> > >> A page that tells user "Your download will begin in a moment..." and
> > >> after a few seconds download starts.
> > >> How can I do that by php
> > >> thanks for any help.
>

Reply via email to