如何检测用户是否下载了该文件

时间:2014-08-06 01:31:38

标签: javascript php pdf download

是否有可能检测到用户是否下载了该文件?如果用户下载了该文件,则该文件现在将从其帐户中删除,因为它只是一次性下载。我不知道是否有,但如果有可能的方法,怎么做?任何帮助表示赞赏。提前谢谢。

这是我下载pdf文件的代码:

HTML

<a href="ebooks/ebook.php?file=<?php echo $row['FILE_NAME'];?>" class="btn btn-inverse" role="button">Download</a>

ebooks.php

    <?php
$file = $_GET["file"].".pdf";
header("Content-disposition: attachment; filename=" . urlencode($file));
header("Content-type: application/pdf");
readfile($file);
?>

0 个答案:

没有答案
相关问题