Is there a simple script or piece of code I can add to my page to keep a log of every visitor, the date and time they hit the page and IP address? And what would be the bes
$line = date('Y-m-d H:i:s') . " - $_SERVER[REMOTE_ADDR]"; file_put_contents('visitors.log', $line . PHP_EOL, FILE_APPEND);
Consider also logging $_SERVER['REQUEST_URI'] or other interesting information, possibly in a more standard format as outlined by @Day.
$_SERVER['REQUEST_URI']