【发布时间】:2016-09-19 23:59:14
【问题描述】:
我正在尝试查找客户端关闭浏览器连接的时间(499 HTTP 状态)。我可以在 nginx 访问日志中看到那些,但我不知道如何从 php 访问它。
【问题讨论】:
-
您应该(最好)使用搜索引擎 + cron 作业(用于索引),从日志中索引数据,例如:ElasticSearch。这个github.com/elastic/elasticsearch-php 有一个 php 库
-
但是在处理您的 php 代码时连接没有关闭。只有当它发送响应,然后再发送给客户端时,连接才会关闭,在它生成之前如何访问它?
标签: php laravel http nginx web