mpf Posted May 3, 2009 Share Posted May 3, 2009 Hi everyone. Thank you for this forum -- I truly appreciate any help you can provide. I have a website where I offer numerous PDFs for download. I was having a problem with people linking directly to the PDFs from their own website, instead of the page where I include the link for the actual PDF. I found a wonderful open source php download script, that did exactly as I needed -- it allowed me to list a direct link on my webpage to the PDF file, where the URL could not be copied and placed in the browser location bar (it would redirect to a page of my choosing), and it protected/hid the actual directory where I uploaded the files on my server. Now for the bad part... I tested some of the pages I changed yesterday, and a couple of those download links are no longer forcing the download pop-up -- they are redirecting only to the redirect page I have specified in the script. Not only that, any new pages that I set up with the new system, do not work (click on the link I provide on the page and it redirects to my redirect page). I am totally at a loss as to why things would stop working, and why I can no longer use this script. I would be sooo grateful if someone could please offer some advice -- I am about to lose my mind. Thanks so much. OOPs, forgot to mention the script I was using -- gowondesigns.com/readme/getfile.html Quote Link to comment https://forums.phpfreaks.com/topic/156682-can-someone-help-a-newbie/ Share on other sites More sharing options...
Daniel0 Posted May 3, 2009 Share Posted May 3, 2009 Without having checked out the script, this topic might be of use to you: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html Quote Link to comment https://forums.phpfreaks.com/topic/156682-can-someone-help-a-newbie/#findComment-825002 Share on other sites More sharing options...
mpf Posted May 3, 2009 Author Share Posted May 3, 2009 Without having checked out the script, this topic might be of use to you: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html Thanks for your reply. The code on the page you listed looks like it lists details about the file -- the script I have does not do that since it looks for many files in the folder according to the link I provide on my site. I just can't understand why today it is randomly working, where yesterday it was working fine for me. This sounds like a silly question, but can a script just stop working? Quote Link to comment https://forums.phpfreaks.com/topic/156682-can-someone-help-a-newbie/#findComment-825009 Share on other sites More sharing options...
Daniel0 Posted May 3, 2009 Share Posted May 3, 2009 Well, in a nutshell, the idea in the topic I linked to revolves around this header: header( "Content-Disposition: attachment; filename=".basename($file)); It tells the browser that the file is to be downloaded. You could probably modify the script to include something like that. Quote Link to comment https://forums.phpfreaks.com/topic/156682-can-someone-help-a-newbie/#findComment-825020 Share on other sites More sharing options...
mpf Posted May 3, 2009 Author Share Posted May 3, 2009 Well, in a nutshell, the idea in the topic I linked to revolves around this header: header( "Content-Disposition: attachment; filename=".basename($file)); It tells the browser that the file is to be downloaded. You could probably modify the script to include something like that. Thanks for your reply. I am not familiar with PHP scripting. Should I have posted this in the 'Third Party PHP Scripts' forum? I would be afraid to change anything without knowing what I was doing. Quote Link to comment https://forums.phpfreaks.com/topic/156682-can-someone-help-a-newbie/#findComment-825025 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.