r00s7a Posted December 10, 2008 Share Posted December 10, 2008 I need help with a script... I am wanting to create a PHP script that creates a txt file when users open or download a document with their username and a timestamp for verification. Would like it to create one log file and append to it each time a new user opens the file. Database name: questusers Table name: ac_users User field: username Ex. Users are logged in under their username. Upon clicking link, the script would take their username and date, and write it to a log file. Each month I would be able to pull the log file and see who has opened the file and when they did it. Using a Linux server, MySQL and PHP 5.0. Any ideas or suggestions of other ways to accomplish this? My fallback idea was to have the uses enter their own username and have it generate an email each time they opened it. Any and all help would be greatly appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/136397-phpmysql-log/ Share on other sites More sharing options...
msinternet Posted December 10, 2008 Share Posted December 10, 2008 The functions you want are fopen() and fwrite() check out w3schools they have a good reference on this. Martin Link to comment https://forums.phpfreaks.com/topic/136397-phpmysql-log/#findComment-711853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.