If your server does not allow you to read its LOG files, you have to stop and analyze your visitors? Make your own LOG file!
The only thing you need to do is to use PHP to calculate the actual number of clicks. There is no Error, and there is no Error like '2017 Not modified' and 'internal Server error. Your code will generate your own LOG file.
<? Php
/* User-Defined variables */
$ Logfile = "clf. log";/* write the LOG file there */
$ Timezone = "+ 0100";/* Timezone correction */
$ Lookup_size = true;/* set file permissions */
$ Document_root = "/usr/local/apache/share/htdocs ";
/* He or she may not count the same client
* You must set the variable $ document_root to work.
*/
Function write_to_log ($ str ){
If ($ fd = @ fopen ($ GLOBALS ["logfile"], "")){
Fputs ($ fd, $ str );
Fclose ($ fd );
}
}
Function get_var ($ name, $ default ){
If ($ var = getenv ($ name )){
Return $ var;
} Else {
Return $ default;
}
}
If ($ remote_host = get_var ("REMOTE_HOST", false )){
$ Remote_host = get_var ("REMOTE_ADDR ","-");
}
$ Remote_user = get_var ("REMOTE_USER ","-");
$ Remote_ident = get_var ("REMOTE_IDENT ","-");
$ Server_port = get_var ("SERVER_PORT", 80 );
If ($ server_port! = 80 ){
$ Server_port = ":". $ server_port;
} Else {
$ Server_port = "";
}
$ Server_name = get_var ("SERVER_NAME ","-");
$ Request_method = get_var ("REQUEST_METHOD", "GET ");
$ Request_uri = get_var ("REQUEST_URI ","");
$ User_agent = get_var ("HTTP_USER_AGENT ","");
If ($ lookup_size = true & $ document_root ){
$ Filename = ereg_replace ("\?. * "," ", $ Request_uri );
$ Filename = "$ document_root $ filename ";
If (! $ Size = filesize ($ filename )){
$ Size = 0;
}
} Else {
$ Size = 0;
}
$ Date = gmdate ("d/M/Y: H: I: s ");
$ Log = "$ remote_host $ remote_ident $ remote_user [$ date $ timezone] \".
"$ Request_method http: // $ server_name $ server_port $ request_uri \" 200 $ size \ n ";
Write_to_log ($ log );
?>