Can anybody convert this perl code into php for me please.


$database = "/full_path/fst/var/www/html/google/google.txt";
$domain = "http://www.domain.com";

$shortdate = `date +"%D %T %Z"`;
chop ($shortdate);

if ($ENV{'HTTP_USER_AGENT'} =~ /google|msn|yahoo/i) {
open (DATABASE,">>$database");
print DATABASE "$ENV{'REMOTE_ADDR'} - $ENV{'HTTP_USER_AGENT'} - $domain$ENV{'REQUEST_URI'} - $shortdate\n";
close(DATABASE);
}