PDA

View Full Version : Download file to temporary internet folder


Moya
01-26-2005, 11:51 PM
Hello All,

Do you have any coding example on downloading txt, zip, rar to temporary internet folder as cached file.

For example, when we use the attachment.php with an id, we are prompted to download the file. I want to stay away from doing this. Whenever I use attachment.php with an id, I want it automatically download to temporary internet folder.

Would you please shed some lights for me

Thanks for reading

sabret00the
01-27-2005, 08:51 AM
so you're saying you want to force download like spyware?

Dean C
01-27-2005, 09:53 AM
There is no way to do this

Moya
01-27-2005, 04:19 PM
sabret00the,

I think it is like that.

Dean C,

Ouch!!! I can perform that function with a physical file and link like http://www.mysite.com/sharestuff/123.zip. This file is copied to the client temporary internet file as cached. My propgram fails when i try to port it to use the file name as http://www.mysite.com/attachmentid=2

Here is what I got when I try



C:/vbb/attachment.php?attachmentid=2c:/vbb/aaa/TestDo.cached
File From: C:/vbb/attachment.php?attachmentid=2
local_cache creation_time =1106790281
Actual time = 1106849872
Timeout = 600
cacheing file (C:/vbb/attachment.php?attachmentid=2) to local (c:/vbb/aaa/TestDo.cached)


Warning: fopen(C:/vbb/attachment.php?attachmentid=2): failed to open stream: Invalid argument in e:\vbb\viewzip.php on line 248

Warning: fread(): supplied argument is not a valid stream resource in e:\vbb\viewzip.php on line 251

Warning: fclose(): supplied argument is not a valid stream resource in e:\vbb\viewzip.php on line 256