Just how do I track documents downloads

I have an internet site that plays mp3s instantaneously gamer. If a customer clicks 'play' the flash gamer instantly downloads an mp3 and also begins playing it.

Exists a very easy means to track the amount of times a certain track clip (or any kind of binary documents) has been downloaded and install?


Is the play link a link to the real mp3 documents or to some javascript code that turns up a gamer?

If the last, you can conveniently add your very own logging code therein to track the variety of hits to it.

If the previous, you'll require something that can track the internet server log itself and also make that difference. My organizing strategy features webalizer, which does this perfectly.

It's javascript code, to make sure that solutions that.

Nonetheless, it would certainly behave to recognize just how to track downloads making use of the various other method (without switching over hosts).

0
2019-05-07 00:12:15
Source Share
Answers: 4

Is the play link a link to the real mp3 documents or to some javascript code that turns up a gamer?

If the last, you can conveniently add your very own logging code therein to track the variety of hits to it.

If the previous, you'll require something that can track the internet server log itself and also make that difference. My organizing strategy features webalizer, which does this perfectly.

0
2019-05-08 20:13:53
Source

You can also set up an Apache.htaccess instruction that transforms *. mp3 demands right into the querystring dubayou is collaborating with. It could be a classy means to maintain the straight demand and also still have the ability to slipstream log function right into the feedback.

0
2019-05-08 20:10:51
Source

Use your httpd log documents. Install http://awstats.sourceforge.net/

0
2019-05-08 19:50:35
Source

The amusing point is I created a php media gallery for all my music 2 days earlier. I had a comparable trouble. I'm making use of http://musicplayer.sourceforge.net/ for the gamer. And also the playlist are constructed using php. All music demand go there a manuscript called xfer.php?file = WHATEVER

$filename = base64_url_decode($_REQUEST['file']);
header("Cache-Control: public");
header('Content-disposition: attachment; filename='.basename($filename));
header("Content-Transfer-Encoding: binary");
header('Content-Length: '. filesize($filename));

//  Put either file counting code here. either a db or static files

//

readfile($filename);  //and spit the user the file


function base64_url_decode($input) {
    return base64_decode(strtr($input, '-_,', '+/='));
}

And when you call documents make use of something like :

function base64_url_encode($input) {
     return strtr(base64_encode($input), '+/=', '-_,');
}

http://us.php.net/manual/en/function.base64-encode.php

If you are making use of some javascript or a flash gamer (JW gamer as an example) that calls for the real link to be an mp3 documents or whatever, you can add the message "& type =.mp3" so the last linke comes to be something like : " www.example.com/xfer.php?file = 34842ffjfjxfh & type =.mp3". In this way it resembles it finishes with an mp3 expansion without influencing the documents link.

0
2019-05-08 19:33:25
Source