How do you Record physical file downloads, or a percentage of a file download?
<p>I would like to record every time a registered user clicks a link and downloads a file from a site. At the moment I am recording every time the link is pressed however this provides no information on if the file is <strong>actually physically downloaded</strong>? and moreover a download percentage if the file is not fully downloaded.</p>

<p>Does anyone know how I would go about recording a <strong>physical download</strong>?</p>

<p>Is this possible? If not through PHP Javascript/Jquery? I am quite lost, all help is greatly appreciated. Thank you.</p>

<p>link</p>

<pre><code>&lt;a href="download.php"&gt;download&lt;/a&gt;
</code></pre>

<p>file</p>

<pre><code>security/user check - record to database....
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="somefile.pdf"');
readfile('somefile.pdf');
</code></pre>
