| |
---|
| | $when = getdate(strtotime($date)); |
---|
| | $request_date = $when["year"]."-".$when["mon"]."-".$when["mday"]; |
---|
| | $datetestB = strtotime($request_date); |
---|
| | /* NJS 2006-04-25 |
---|
| | Changed date comparison to <= from < to avoid the problem |
---|
| | of counting multiple times downloads whose $request_date |
---|
| | == $lastproc. This only occurred if you ran this script |
---|
| | several times per day. For example, if you ran this |
---|
| | IMPORTANT: if you run this script more than once per day, |
---|
| | it will count multiple times downloads whose |
---|
| | $request_date == $lastproc. For example, if you ran this |
---|
| | script five times per day, all the downloads that |
---|
| | occurred during that day would be counted EVERY TIME this |
---|
| | script ran, thus overinflating your stats by a factor of |
---|
| | up to five :( |
---|
| | up to five :( This happens because $lastproc has one day |
---|
| | as its base unit. |
---|
| | |
---|
| | If finer granularity for stats updates is desired, the |
---|
| | solution would be to use the full timestamp rather than |
---|
| | just the date. |
---|
| | */ |
---|
| | if ($datetestB <= $datetestA) |
---|
| | if ($datetestB < $datetestA) |
---|
| | continue; |
---|
| | |
---|
| | // NJS 2005-11-25 Added regexp for EPrints short URLs. |
---|
| | if(preg_match("/GET \/archive\/0{1,8}\d{1,4}\/\d\d\//i",$buffer) || preg_match("/GET \/\d{1,4}\/\d\d\//i",$buffer)) { |
---|
| |
---|
|