redirects after X amount of downloads

3 replies
is there a script out there, open source that limits downloads? either by amount of downloads, time, date range, etc? after it expires it redirects to a page of choosing??

I have a script that limits downloads, but after it expires it states the link has expired, would be better if it redirects.
#amount #downloads #redirects
  • Profile picture of the author sannyman
    Dear ianternet,
    You can modify the script's behavior, to redirect towards another page. If you can't, please PM me and I will help you.

    Regards!
    {{ DiscussionBoard.errors[467194].message }}
    • Profile picture of the author Bruce Hearder
      Hi ianternet,

      depending on howe the php code is written, this may or may not work, but there is a good chance it will:

      Open the php script file, and find the location in the code where it says its has reached the download limit or timed out, and then insert the following code :

      header('Location: http://www.somesite.com/sompage.html');

      That's it..

      It will now redirect to a page located at :
      http://www.somesite.com/sompage.html

      If this does not work, then send me a PM and I'll give you another bit of code that will work..

      Take care and let me know how you get one..

      Bruce
      {{ DiscussionBoard.errors[468795].message }}
  • Profile picture of the author Ethan Evans
    I like the suggestion Bruce made. One other way to possibly deal with this is to let them see the message that says the link has expired. That might be important for them to know depending on the situation. Under that you can add a message along with a hyperlink to whatever page you want them to be redirected to. Just presenting them with an page that says their download link has expired and nothing else could cause more confusion and headaches, so I see why you would want a redirect to happen. So now it just comes down to deciding if the redirect should be automatic or if they should be allowed to see some info first and then click on a link to go somewhere else.
    {{ DiscussionBoard.errors[478345].message }}

Trending Topics