Forum Moderators: open
just include a script that looks at $_SERVER['HTTP_USER_AGENT [php.net]']
if it finds your matches it could write it to a text file.
User Agent: Request.ServerVariables("HTTP_USER_AGENT")
IP Addy: Request.ServerVariables("REMOTE_ADDR")
weteo is correct, the host name may not be available on your server - many hosting companies turn this "off" because it places an extra load on the server. But if you are looking to use it to identify Googlebot, it is redundant, as you can do that with the User Agent. IP Address, which you did not mention, is also useful, as it will allow you to distinguish between deep crawler and Freshbot!
If you don't wish to track every access to your web pages, but just those from Googlebot, you can also do this -
If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Googlebot") > 0 then ...
(log code here)
End If