I thought I had written about this earlier but I can't find it so perhaps I've only thought about it at some time.
Anyway, it can be quite useful to log some info to the apache error log when a PHP
script is accessed.
Here's an example of how to do this using the
$HTTP_REFERER = $_SERVER['HTTP_REFERER'];
if ($HTTP_REFERER == "") $HTTP_REFERER = "unknown";
$REQUEST_URI = $_SERVER['REQUEST_URI'];
error_log("NOTE: $REQUEST_URI accessed, referer: $HTTP_REFERER");
This will print something like:
[Sun Jan 2 15:13:20 2005] [error] NOTE: /stuff/file.php accessed, referer: http://domain.com/file.html