0

Is there any possible to detect if the user downloaded the file? If it was downloaded by the user, the file now will be remove from its account because it will be a one time download only. I don't know if there's any but if there is a possible way to do it, how? Any help is appreciated. Thanks in advance.

This is my codes for downloading a pdf file:

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);
?>
Ejardy
  • 101
  • 1
  • 4
  • 14

0 Answers0