Version release history of PhpTrackIT

PhpTrackIT version and development history, saved in an easy overviewed table:

Version history of the PhpTrackIT

Ver. date




Updated two plugins:

♦ Have added Screen Aspect Ratio:
To the plugins Client_Screen_Resolution and Client_Scrn_Browser_Stat.
The ScreenAspectRatio() function is placed in the common Functions file.

Updated core function:

♦ Updated the functioncore file.
The visit logging was blocked when SSL (https://) was introduced on the website 2018-10-29. Logging is fully functional again today.

The AsynchronousBackgroundProcess uses the asynchronous php function stream_socket_client() for http:// connections:
$fp = stream_socket_client ("tcp://", $errno, $errstr, ini_get ("default_socket_timeout"), STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_CONNECT);

For SSL / https:// is now this used:
$fp = stream_socket_client ("ssl://", $errno, $errstr, ini_get ("default_socket_timeout"), STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_CONNECT);

It was both the protocol that should change from tcp:// to ssl:// and the port from 80 to 443 for the SSL socket connections.

I also created a slightly more efficient queuing method for the data file write, which shall be implemented to the AsynchronousBackgroundProcess later on.

Updated the PhpTrackIT presentation software:

♦ Have set all the security headers for the website:
Referrer-Policy, X-XSS-Protection, X-Frame-Options, X-Content-Type-Options, Content-Security-Policy, Feature-Policy & Strict-Transport-Security.
And verified them at Security Headers:
Security Report Summary: Class A security

Updated core function:

♦ Updated the phptrackitasyncprocess & PhpTrackIT.
Introduced logging of max statistics of visit sessions, for 30 day, 7 day and 24 hour statistics.
Fixed that all error messages, like 404 and 403 error code, also sends the corresponding http_response_code() to the client. Now even for a faulty query string for the plugin, with not useful parameters.

Updated core function:

♦ Updated the phptrackitlogLib.
Changed to the navigator.sendBeacon() method for the asynchronous transfer of the small amount of client analytics data over HTTP to the web server. Used asynchronous AJAX before.
Keeps asynchronous AJAX as a fallback method for cases where the webbrowser don´t support sendBeacon or the browser couldn´t make a sendBeacon transfer and return false.
SendBeacon works smoother and surprisingly a little faster than the before AJAX calls, probably due to less JavaScript code involved. And the sendBeacon interferes much less with the loading of the web page, thats what it´s designed fore. Which shows up in the statistics!

Updated core function:

♦ Updated the phptrackitasyncprocess.
Made a secure_fwrite function replacing all fwrite, and added the global FILETIME constant for the time to try to access the data files, and increased it to 15s (5s).
Also introduced the ignore_user_abort(true) on all php-files involved in background data logging.
About secure fwrite: User Contributed Note 9 on fwrite().
Still loosing some not logged data when viewing large photos in a fast sequence, 25% missed for the latest 24hr before this change 13:05 and in average 5% for the latest 30 days (before introducing the ignore_user_abort(true)!). Seems to have solve this now when not extreme fast viewing of photos, but have to see some more time first!

2018-07-11. Now the missed logged viewed photos data seems to have stabilized around 1% (2 of 164 viewed photos latest 30 days). It´s much better but not fully OK. I have some ideas to look into the AJAX log process to see if I have to add background processing to it also. It´s hard to debugg time critical background processing but shall test to temporarly block the processing of th 24hr log file to catch all the raw logged data in it (on my off-line development server). At provocative extremely fast viewing of photos is still the missed logged viewed photos data much higher, which I aim to solve fully in the future.
This is a good performance test of the PhpTrackIT visit data logger! Normally there is no way of detecting missed logged visits data, but at viewing the full size photos there is included a counter of consecutive viewed photos, which indirectly indicates missed logged data that is used in the detection here.

Updated core function:

♦ Updated the phptrackitasyncprocess.
Removed the influence on timing of the getrusage(), which gives a not suitable timing that sometimes blocked the rewrite of the log files due to too long script execusion time, and thus blocked the log file processing.
Introduced the $_SERVER["REQUEST_TIME_FLOAT"] instead, to capture the full real time used by script execution, to look if there is enough execution time left to safetly rewrite the log files.
Now only rewrites the 30d logfile when processing has changed it.

Updated the ServerTime_PageScript_async plugin:

♦ New: Percent of webpages used server execution time < 1.0s.
♦ Fixed a bug of how many webpages was time analyzed.

Updated core function:

♦ Updated the phptrackitlogCookie.
Introduced a PhpTrackIT session cookie to handle logging of visit sessions. Makes the statistic analysis simpler and faster.
Secured the cookies with the httponly = true.

Updated the PhpTrackIT presentation software:

♦ Updated the PhpTrackIT.php.
Introduced the 404 Not Found error code when not found a requested Plugin module, and updated the error message with this error code text. Search engine robots will thus be aware of deleted or changed plugin modules. And hackish type visits will be aware of not found their malicious plugin module requests.
Secured the phpinfo from be viewed without login.

Updated core function:

♦ Updated the phptrackitlogLib.
Introduced the 404 Not Found error code when detecting a Hackish style access attempt in the software firewall. Thus will these visitors know they did´t found any web page via their often malicious query strings or other attack vectors.

Updated core function:

♦ Updated the functioncore & phptrackitlogLib.
Some more Referer and Requested URL footprint as HackishStyle.
Has limited the length of the Referer (300 char) and the Requested URL (200 char), and also restrained the length for some hackish spamming content for them. Thus filtering unneeded hackish spam data, which takes to much log file space to save.
Removed Referar as, to save space in log files:
New Plugin

Created a new plugin module:

Gives statistics of the length of the logged Referers and Requested URLs, in data and diagram of its distribution.
Example of data for one site:
Lenght Requested URL, Max: 1115 || Min: 1 || Mean: 42.2 || Median: 32
Lenght Referer, Max: 890 || Min: 12 || Mean: 52.8 || Median: 52

Updated the About plugin:

♦ Updated some outdated links.

A completely new logging engine (logging kernel):

The logging engine is completely rewritten from ground with new functionalities. With this new version is all data logging done as parallel asynchronous background processes, based on the php stream_socket_client() function. Thereby is the server time of the real time visit data logging, delaying the display of the web page, as minmized as possible! This gives fast loading web pages!
And fast loading web pages are very important for SEO!

The structure of the code is also highly improved, where each data logging part now is made by its own separate functional block, thus making future adding of new data logging blocks and functionalities much easier, as well as improving existing ones.

All the functional processing of the collected visit data have been made much more streamlined in the new data logging core code by devided into clean functional modules, which makes all the data logging more server time efficient in total.

A lot of efforts have been made in the new data logging core, to reduce all readings and writings from / to the hard disk data files on the server, which lowers the load on the server.

Efforts have also been made to further minimize the risk of losing any even small portion of the collected visit data during the data logging process into the data files, which slightly increases the accuracy of the web analytic visitor statistics.

This new data logging process, done as all pure php parallel asynchronous background processes, also open up for making the post processing and precompilation of the visit data in connection with each visit data logging, whether it be a human or robot visits.
Earlier the data processing was performed only after each human visits (due to the asynchronous Ajax / JavaScript was not executed by the most robot visitors), which could lead to a lot of visits data was queued up waiting for processing during periods of only robot visits. This could lead to such a large amount of data queued up, that those maximum server time for a php file´s execution was exceeded and there were problems in the data logging processing.
This is all solved now by this new version of the data logging kernel, doing all the data processing asynchronous in the background directly via the php stream_socket_client() function!

The new code is additional enhanced by Refactoring in several steps to secure a good quality of the code and an easy future maintainability.

This new data logging kernel has been run in parallel with the old one (version on the same website during several months as a benchmark test.
The results are very clear that the new data logging kernel is significantly more economical on server time, distinguishes human visits from robots a little more efficiently, processes the robot visits data more effectively by removing redundant robot visit data, which reduces the number of logged robot data entries significantly (= more true robot visit web analytic statistics), and in total collects a little more visit data details.

It was a long demanding work to do, with long periods of pauses due to my lack of stamina but also for thinking and letting thoughts mature, but finally it´s here!

Reference: Article about background processing in php.

Implemented Responsive Web Design (RWD):

Updated the PhpTrackIT presentation software to adapt to the resolution of the browser window, to display well all the way down to small screens of smart mobile phones / smartphones.

The Responsive Web Design (RWD) of the PhpTrackIT uses a combined fluid liquid layout, adaptive design and functional design, with six adaptive layout steps for the width and three for the height of the browser window.
The responive web design is by that both horizontally responsive and vertically responsive.

The Responsive Web Design (RWD) is implemented by the use of CSS media-queries and JavaScript, redundant to each other to give a wide browser support. The JavaScript also don´t load resources not used in the layout steps in smaller browser windows, to save both bandwith and device memory.

Updated logging engine (logging kernel):

Added logging of running 30 day value of returning UVV visits / UVV visit sessions, UVV Pageviews, Unique UVV visitors, Visit sessions and Pageviews. (Works OK from 2011-06-16, 12:00.)
Now displays the number of returning visits of the UVV as a running value of the latest 30 days.

Updated the PhpTrackIT presentation software:

Changed the layout kernel of PhpTrackIT program to work OK independent of client screen resolution i.e. now displays nice even on mobile units! Tested on my Nokia 5230 Symbian with 640x360 screen resolution and it works OK. Has also introduced a button to Hide / Show the left vertical menu row, to display better on low screen resolution devices as mobiles and tablets.

Allthough the large impact on the layout independency of the screen resolution, was it fairly small changes to code for me because of the structured and CSS based layout kernel.
New Plugin

One new plugin module:

♦ Graph Searched Strings - This plugin displays statistics about the Search Strings used in Search Engines giving visit hits, found in the referrer. The Search Engines used for each Search String are listed together with its data.

Updated the PhpTrackIT presentation software:

Introduces the new inovative and intuitive ClickTrackIT data filter method, which makes it easy to explore almost infinite aspects of your visitors tracks on the website, only limited by the amount of logged data! A bit of a new paradigm in interactive data filtering.
Filtering parameters are added step by step by clicks on icons or text buttons, displayed in connection with each displayed data field.

ClickTrackIT gives a fast intuitive learning curve in filtering data.
The ClickTrackIT GUI makes it very easy for third party developers to include this intuitive filtering in their plugin modules, including the support for own labeled ClickTrackIT buttons.
The implementation of the ClickTrackIT function was made by surprisingly few rows of code, all in line with the mindset of the PhpTrackIT´s development by the:
Keywords: Lean, Clean, Simple, Inuitive, Smart and Proactive.
New Plugin

One new plugin module:

♦ Graph - Search Engines used - This plugin displays all Search Engines, the corresponding web sites and frequency of visits fed by them. Includes live links to the found Search Engines.

Updated logging engine (logging kernel):

Some enhancement in the fingerprint method of classifying VisitorType into Human or Robot ones.

Updated the PhpTrackIT presentation software:

Implemented the functions for the ability to be able to turn over the pages, when log posts numbers to display are more than the value for displayed log posts per pageview.
New Plugin

One new plugin module:

♦ Map - GeoIP Human World - This plugin plots the geolocated positions of human visitors on a World Map.
New Plugin

One new plugin module:

♦ Log Returning human UVV - This plugin shows the returning human visitors and the number of webpage visits by them.

Updated logging engine (logging kernel):

Included logging of client browser window size and via cookie of returning visits of website (time limit defining a returning visit: sessiontimewindow, default as 3hr).
Some enhancement in searching out log post data for visualizing different types of visits.
New Plugin

One new plugin module:

♦ Server Time of Page Script - This plugin shows the measured real time the php-script of a webpage takes to execute on the server side, at each visit to the website.
I.e the respond time from the webpage request came to the server until the server has executed all php-script for the webpage and delivers the html code of the webpage.
New Plugin

One new plugin module:

♦ Summary - a system plugin, only showing up in the system menu.
And by that the PhpTrackIT core program was updated with a system menu item to this new Summary plugin, to support it.

New logging engine (logging kernel):

A brand new complete rewritten logging engine with an enhanced, more complex and more powerfull ability to distinguish in analyse and presentation between human visits and robot visits.
The new logging engine also logs more aspects and data about each visits, like time used for logging (primary and secondary logging), ping time, the URL hash (bookmark) and what JavaScript / CSS are loaded like AJAX, JS preload of image, external JS file and CSS.
The GeoIP Countries, Regions and Cities of the visits are now evaluated at the logging time and stored in the data file post, thus making later analyses and presentation faster.

The new logging engine is more optimized, has a clearer internal function and by that runs leaner using less server time.
The new logging engine has a more modern approach using AJAX and other JavaScript calls as key components in the logging.
The new code is also enhanced by Refactoring in several steps to secure a good quality of the code and easy future maintainability.
The PhpTrackIT presentation software is also slightly modified to adapt to the new data file format.
During a month test time in parallel operation with the old one, gave comparisons about 5% more logged human visits for the new logging engine, some earlier visits faulty logged as human ones now logged as robot visits and vice versa, along with slightly more over all logged visits.

This new logging engine development was more work demanded than foreseen, due to the somewhat fuzzy behaviour of the Internet, demanding a lot of filtering and analyses to avoid faulty redundant data posts and to more accurate distinguish the human visits from the robot ones.
New Plugin

One new plugin module:

♦ VersionHistory - a system plugin i.e. not showing up in menu.
And by that the plugin "About" was updated with a link to this new VersionHistory plugin and the PhpTrackIT for supporting this new system plugin.
New Plugins

Four new plugin modules:

♦ Graph - GeoIP Human Countries
♦ Graph - GeoIP Human Regions
♦ Graph - GeoIP Human Cities
♦ Graph - GeoIP Robot Countries

The PhpTrackIT takes over all logging on website!

The PhpTrackIT presentation software and logging engine are now that refined, making them capable of taking over all visit logging and statistic presentation for my website.

The PhpTrackIT presentation software goes live!

At last the PhpTrackIT presentation software is ready to go live on my webpages and be official available for my visitors.
The logging database has data saved since 2008-01-02 by the logging engine, hence is there some visit statistics to display.

An update of the logging engine.

Updated due to a programming fault / bug, which made the 30day logging data file to drop all its content every 3 to 6 month.
It is very hard to verify that seldom problem, but hopfully is it solved by now.
Introduses a classifying "VisitType" in each visit data post, which makes it easer, faster and more processor lean to present different statistic aspects of all visits.
Visits are now classified into: "Human", "Robot", "ReferSpam" and "HackishStyle".

The first version "official" used on my websites.

Just now is only the logging engine and the small visit statistic summary pane at the bottom of the webpages in use.

The very first beginning of coding the PhpTrackIT.

I have used an other free Php visit counter script installed at my webpages 2005-01-24 and during the following monthes enhanced and modified slitly by me. This was the very best free one I could find on the Internet, after a lot of investigation and searching. And it was very good, but didn´t nevertheless perform the task fully to my satisfaction.
From the free Php visit counter experiences was som new ideas and wishes borned and I begun slowly sketching on a wish list and mind map for a new visit logging software.
The free one consumed a lot of processor power, didn´t distinguish in analyse and presentation between human visitors and indexing robots and it was so focused on the individual visits, where I was more interested in trends and aspects of numerous visits. Neither could it track the screen resolution of the client (visitor) or the hash (bookmark) part of the URL.

In the PhpTrackIT version number are the two first numbers the version of the PhpTrackIT presentation software and the last two numbers the version of the logging engine (logging kernel) working unvisible in the background, logging all tracks of visitors.

PhpTrackIT Core Plugin: VersionHistory, Version 1.0, 2010
Copyright © 2010 Bosse at

Visa BesöksStatistik:

Loggat av: PhpTrackIT
(max 1 besök loggas per 3.0 hr per unik besökare¹ och webbsida)

Hela webbplatsen:
- Webbsidor¹ senaste 30 dygnen: 1354 av personer² & 1539 av robotar²
- Webbsidor¹ senaste 24hr: 33 av personer² & 54 av robotar²

- Unika besökare¹ senaste 24hr: 25 personer², 17 robotar²
- Webbsidor per unik besökare senaste 24hr: 1.3/person², 3.2/robot²

- Unika besökare¹ senaste 30 dygnen: 660 personer², 170 robotar²
- Webbsidor per unik besökare senaste 30 dygnen: 2.1/person², 9.1/robot²

- Snitt senaste 30 dygnen (webbsidor/24hr): 45 av personer² & 51 av robotar²
- Snitt senaste 30 dygnen (unika besökare/24hr): 22.0 personer² & 5.7 robotar²
- Robotar utgör 53.2% av besöken senaste 30 dygnen

- Max webbsidor/24hr: 295 av personer, 2018-05-28
- Max unika besökare/24hr: 148 personer, 2018-05-28
- Max webbsidor/30dygn: 5168 av personer, 2018-08-06
- Max unika besökare/30dygn: 2663 personer, 2018-08-06
  Max statistik loggad sedan: 2017-12-31

- Server time uses for PhpTrackIT logging:
- Primary log: 23.0 ms (log time part affecting webpage load time)
- Secondary log: XXX ms (asynchronous log time not affecting webpage load time)
- Ping time (Server-Browser-Server Internet round-trip time, via Php/Ajax): XXX ms
- ServertimeThis: 6.3 (ms), inclusive Includetime: 1.4 (ms)

¹ Enligt en anonym unik virtuell besökare algoritm (UVV, Unique Virtual Visitor).
² Enligt en robot-igenkännande algorithm som effektivt skiljer på robot- och person-besök.


Contact about the viewed logged statistic tracks, see at site:

PhpTrackIT, version:  
Copyright © 2005-2019 Bosse at
PhpTrackIT Logo
 Webpage, Server time: 51 ms, of that Plugin: 5 ms ||