SSI : Internet Explorer 5 (Win)でアクセスした数を表示する

書式

<!--#exec cmd="grep 'MSIE 5.0' /usr/local/apache2/logs/access_log | grep 'Windows' | wc -l" -->

説明

Internet Explorer 5.0 (Win)でアクセスした数を表示させるにはgrepを使ってアクセスログからMSIE 5.0の文字を抽出します。wc -lで行数をカウントすればアクセスされた数が表示されます。Windows版は5.0と5.01ですが、Macintosh版は5.0〜5.23などのバージョンがあります。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Internet Explorer 5 (Win)でアクセスした数を表示</title>
</head>
<body>
Internet Explorer 5 (Win)でアクセスした数<br>
<pre>
<!--#exec cmd="grep 'MSIE 5.0' /usr/local/apache2/logs/access_log | grep 'Windows' | wc -l" -->
</pre>
</body>
</html>