duancong2160 2016-05-20 18:56
浏览 34

PHP,用于检索有关资源的信息的脚本,使用访问日志文件

In order to not reinvent the wheel,

Someone knows a script (or class) that can read the log file from apache web service (access_log) and returns information about the times you have viewed a resource as a picture?

My system is Centos7 and Apache.

I thought to program a PHP script which stores the resource requests in bbdd, but why to increase the load with several insert queries per page? when can use the access_log

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • doutui4649 2016-05-20 20:00
    关注

    Why PHP? From the command line:

    grep /var/www/html/filename /var/log/http/access_log  | wc
    

    Or use awstats or similar

    评论

报告相同问题?