Splitting a large Apache log file with PHP

[code language=’php’] $months = array(   ‘Jul’ => ’07’,   ‘Aug’ => ’08’,   ‘Sep’ => ’09’ ); $open_file = false; $fw = false; $fp = fopen(‘filename.log’, ‘r’); while($line = fgets($fp)) {   preg_match(‘:([0-9]{2})/(Jul|Aug|Sep):’, $line, $matches);   // $matches[1] =…

wordpress / gentoo / apache / mod_rewrite 的設定

<VirtualHost *:80>   ServerName toy.monster.tw   ServerAdmin rimmon@monster.com.tw   DocumentRoot “/var/www/toy.monster.tw”   CustomLog /var/www/toy.monster.tw/log/access_log.txt combined   <Directory “/var/www/toy.monster.tw”>     Options FollowSymLinks     AllowOverride All     # AllowOverride controls what directives may be placed in .htaccess files.     Order allow,deny    …