Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder fireblade's Avatar
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Download using a file ID along with the URL?

    say that i have a file to be download the name is "install.pdf". I need not to give the direct access to this file and i want to count the downloads count of the PDF.

    So i know it is possible to track the download of file by using a files name with a webpage's address URL like this
    http://mydomain.com/download.php?fileID=install.pdf
    So how can i process this URL variable to let the file download..??
    I nedd only the method of process to let download, I already know how to add the count to dayabase..

    Please any one could help me?

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Take a look at header()

    Have the url point to an ID in mysql, then mysql to return the true url of the file and place it in header(). Users will be unaware of the file location

  • #3
    New Coder fireblade's Avatar
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did it thanx.. but it is opening in the same window and the file gets downloaded. but the browser goes blank.. how can i make it to open in a new windows?

    when it is a PDF it tries to open in the same window without opening the download window.. how can i redirect it to the download Manager?
    Last edited by fireblade; 07-16-2007 at 06:02 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •