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
The simplest piece of code to add to your page is no code at all. So might I suggest "something else"? Try using your webserver's built-in request logging facility instead of writing some custom PHP code.
Apache and many other webservers can produce logs in the Common Log Format (CLF) and there are many tools available to analyse such logs and draw pretty graphs for you (Webalizer, Awstats etc). A CLF log line looks like this which gives you all the information you asked for and more:
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
See the appropriate bit of documentation for your webserver for how to configure logging and give it a whirl: