Mar 8 12:51:26 10.10.255.5 haproxy[4844]: 124.240.36.246:10313[10.10.255.5:60343]->58.252.186.10:80[58.252.186.10:80] [08/Mar/2012:12:51:26.392] http_check tcp_proxy/<NOSRV> 1/28/72 163 -- 608/608/541/0/0 0/0截取[58.252.186.10:80]
调试欢乐多
Mar 8 12:51:26 10.10.255.5 haproxy[4844]: 124.240.36.246:10313[10.10.255.5:60343]->58.252.186.10:80[58.252.186.10:80] [08/Mar/2012:12:51:26.392] http_check tcp_proxy/<NOSRV> 1/28/72 163 -- 608/608/541/0/0 0/0
TXT;preg_match('/\[[\d.:]+\].+(\[[\d.:]+\])/', $s, $r);echo $r[1];[58.252.186.10:80]不过日志不是这么分析的
这一段,而且我还要统计ip的访问量
改为
preg_match_all('/\[[\d.:]+\].+(\[[\d.:]+\])/m', $s, $r);
追加什么ip,在哪里追加?
你就说你要取出些什么吧?