in reply to is there something wrong with this code?

i noticed this which doesn't seem right:
$log_strig = "$remote_host - - [$date] \"$request\" 200 -";
you might want to add the 'n' in $log_strig, same goes for $remoth_host.