Click to See Complete Forum and Search --> : Track downloads


tripwater
07-20-2004, 09:01 AM
Hello,


I have a site that allows support as well as customers to upload files. Then there is a section in the site where they can view the attached files for a particular issue.

This page is a popup that uses frames, left and right. Left frame has a list of all files attached to the issue. If it is an image or text file and they click the link, it loads the image/text file in the right frame for viewing. If they want to download it they right click the link and "save target as". If it is a zip or exe then it downloads it when they single click it.


I know if they click to download an exe or zip or view a image/text file in right frame, I can track this, but what I do not know is how to track if the right click and "save target as".

I would like to store this in a database so I know if they have either viewed it or downloaded it.

Thanks for any help.

tripwater
07-21-2004, 08:59 AM
bump

tripwater
07-22-2004, 08:36 AM
Is this a stupid question? Not trying to be a jerk so please do not take it that way but usually I get a response of some kind.


If this is a ridiculous question, please let me know.


I thought this could be done and I did a search on this site for a similar post and found none.

Again I am genuinely asking if this is a stupid question not trying to be sarcastic.

Thanks again for your time

olaf
07-22-2004, 10:02 AM
Hello,

this is not done by javascript...

You can use a serverside language to count the accessed file. But in this case you have to redirect via download script...

tripwater
07-22-2004, 10:55 AM
Thanks for the reply

So I will have to use php to track the right click "Save target as"?

I knew I had to use php to track if they clicked on the link to download an exe or zip or if they viewed an image in the right frame by clicking the link. I just assumed that since nothing technically got posted over and was right clicked, I would have to use JS.

I guess I was wrong...

olaf
07-22-2004, 01:54 PM
No, you need a download script take a look on my example: Universal downloader (http://www.finalwebsites.com/snippets.php)

Just call you download.php with the id of the record and update the record (counter) first.