View Full Version : Download using a file ID along with the URL?

07-15-2007, 02:11 PM
:confused: 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
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? :confused:

07-15-2007, 02:33 PM
Take a look at header() (http://www.php.net/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

07-16-2007, 06:56 AM
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?