title: How do you monitor a file on a web server and log every access, ideally by IP address, in a database (MySQL)?
body: <p>For security reasons, there is a certain file on my web server I want to be able to monitor access to. Every time it is accessed, I want to have an entry added to a MySQL log table. This way, I can actively respond to security breaches from within the web application.</p>