标签云

微信群

扫码加入我们

WeChat QR Code

I have a website that plays mp3s in a flash player. If a user clicks 'play' the flash player automatically downloads an mp3 and starts playing it. Is there an easy way to track how many times a particular song clip (or any binary file) has been downloaded?Is the play link a link to the actualmp3 file or to some javascript codethat pops up a player?If the latter, you can easily add yourown logging code in there to track thenumber of hits to it.If the former, you'll need somethingthat can track the web server logitself and make that distinction. Myhosting plan comes with webalizer,which does this nicely.It's javascript code, so that answers that. However, it would be nice to know how to track downloads using the other method (without switching hosts).


there is a directory traversal vulnerability in this script! An attacker can pass in xfer.php?file=../../../passwd or whatever else they want! Be careful!!!

2019年04月19日26分56秒

this will blow up the server's memory limits if the files are too big and your traffic is high.. something i've experienced myself.

2019年04月19日26分56秒

how to fix the "directory traversal vulnerability" ?

2019年04月19日26分56秒

anarchOi: The easiest way would be to compare the GET parameter ($_REQUEST['file']) against a whitelist of known-good file names.For instance, a listing of all files in the directory you store your files.Make sure you only use that directory for storing files you want to be downloadable...

2019年04月19日26分56秒

tmsimont, Have you found out any ways of lowering memory consumption?

2019年04月19日26分56秒