Jump to content

Can someone help a newbie? :)


mpf

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.