I'm doing a system in php where the counter sends a file to the client (using database). My question is as follows, how to do when the client accesses this file, be sent to the database the time and date it was opened.
I was able to resolve it.
I have done the following, as soon as the user accesses the document (via querystring ), I do an update in a field that I have in the database with the name " / em> "by putting the current date through the sql function" CURRENT_TIMESTAMP "and enter 1 in the file_id field. So in the page where the saved documents are listed, I make a condition: If the file is equal to 0 , then I highlight the file title so that the user knows that file has not yet been viewed.