Creating a Page Logging Trip Mechanism
All scripting programs (e.g. ASP.NET, PHP, etc.) can easily be logged through the script’s file functions. However, logging HTML page access is a bit of a challenge. I personally prefer creating all web pages in PHP, however, in cases where the webmaster of a site is not a web engineer, then the site will most likely be made up of HTML documents. However, the need to track page visits is still crucial, and relying on the various web stats programs may not be ideal.
Web stats are gathered through the web log commonly known as “access.log” on a Linux platform. A Windows platform, typically using IIS, has something similar that escapes me at the moment. Reading through these files to get an idea of your web activity is daunting.
What I propose is a simple PHP file that can capture all the important information such as page name, date, time, refering page, visitors IP and/or host name, etc. This data can be stored in a database and retrieved using SQL scripts. The script returns GIF image data that displays a 1 pixel dot. This way the “bot” can be inserted into a page with this tag: <a src=’/phpscripts/phpLogger.php’ width=’1′ height=’1′ >. This tag can be placed virtually anywhere on the page.
