Forum Moderators: coopster

Message Too Old, No Replies

Unable to Browse Parent Window with Secure Downloads Functionality

         

LOLDavid

12:37 pm on Feb 13, 2007 (gmt 0)

10+ Year Member



We do audio downloads through our site securely. We are using :

session_cache_limiter('private, must-revalidate');
Session_start();
header("Content-Disposition: attachment; filename=\"$f_name\"");
header("Pragma: public");
//Set the content type
header('Content-type: '.$filetype);
header("Content-type: application/x-download");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
//Read the file into the browser.
readfile( $path . $file );

The issue is that using this code does not allow users to browse links in the parent window till the download is complete. The client we are working for is requiring this functionality. Please help us resolve this as soon as possible.

coopster

12:04 am on Feb 19, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, LOLDavid.

Have you considered opening a separate window for the downloaded link being clicked?

jatar_k

1:36 pm on Feb 19, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I thought that was what LOLDavid was doing because he mentioned parent in his title

that had me stumped, if that is not the case then you would need to do as coopster mentioned and that should fix it