track.php does not deal correctly https in statistics. sitename detection and referer detection are broken when the web page are:
https://www.kensan.it/articoli/Telnet.phpsee this two PHPwebstat stats picture whit the bug and with the bug correct:

where SITE is
www.kensan.it/articoli/Telnet.php and REFERER is
https://www.kensan.it/articoli/Telnet.php.

where SITE is articoli/Telnet.php and REFERER is the same and is in black color.
The https bug is in the track.php file and in sitename detection and referer detection section:
Code (PHP):####################################################################
### sitename detection ###
$temp_site_name = substr ( strstr ( substr ( $js_url , 8 ) , "/" ) , 1 );
Code (PHP):####################################################################
### referer detection ###
substr ( $js_referer , 0 , strpos ( $js_referer."/" , "/" , 8 ) )
substr ( strstr ( substr ( $js_referer , 8 ) , "/" ) , 1 )
The bug is that "http://" has 7 chars but "https://" has 8 chars, in the original track.php the numbers are 7, in the above track.php the numbers are 8 and are correct fot https sites. For http sites the number correct is 7.
So for correct the bug it neded to change track.php with the code:
Code (PHP): //------------------------------------------------------------------
// SSL Fix by www.kensan.it Sandro kensan
if ( $_SERVER [ "HTTPS" ] == "on" ) {
$len_http = strlen("https://");
}else{
$len_http = strlen("http://");
}
//------------------------------------------------------------------
####################################################################
### sitename detection ###
$temp_site_name = substr ( strstr ( substr ( $js_url , $len_http ) , "/" ) , 1 );
####################################################################
### referer detection ###
substr ( $js_referer , 0 , strpos ( $js_referer."/" , "/" , $len_http ) )
substr ( strstr ( substr ( $js_referer , $len_http ) , "/" ) , 1 )