<?php
 #$site     = $_SERVER['PHP_SELF'];     # filename to count
 $ret      = time ();                   # unix timestamp
 $ip       = getenv ( "REMOTE_ADDR" );  # get IP address
 $ip_name  = gethostbyaddr ( $ip );     # get hostname 
 $database = "log.txt";           # edit the folder to your logfile
 
 $accessdb = fopen ( $database , "a+" );
  fwrite ( $accessdb , "\n".$ret."*".$ip."*".$ip_name."*".$_SERVER['HTTP_USER_AGENT']."*".$site."*".$jsref."*".$jsres."*".$jscolor."*" );
 fclose ( $accessdb );
?>
