<% Response.ContentType = "text/plain" Dim objFileSystem 'As Object 'file system object Dim objLogFile 'As Object 'log file object Dim strFile 'As String 'Complete path to log file strFile = "D:\applogs\Robots\" & ReturnDate("FILENAME") & ".log" Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") If objFileSystem.FileExists(strFile) Then Set objLogFile = objFileSystem.OpenTextFile(strFile, 8) Else Set objLogFile = objFileSystem.CreateTextFile(strFile) End If For Each strItem In Request.ServerVariables If Trim(Request.ServerVariables(strItem)) <> "" Then Select Case strItem Case "REMOTE_ADDR", "REMOTE_HOST", "HTTP_ACCEPT", "HTTP_USER_AGENT", "HTTP_FROM" objLogFile.WriteLine(ReturnDate("") & ", " & Time & ", " & strItem & ", " & Request.ServerVariables(strItem)) Case Else 'Do nothing (for now) End Select End If Next objLogFile.Close Set objLogFile = Nothing Set objFileSystem = Nothing %> User-agent: * Disallow: /_borders/ Disallow: /_derived/ Disallow: /_fpclass/ Disallow: /_overlay/ Disallow: /_private/ Disallow: /_themes/ Disallow: /_vti_cnf/ Disallow: /_vti_log/ Disallow: /_vti_pvt/ Disallow: /cgi-bin/ Disallow: /iesetup/ Disallow: /images/ <% FUNCTION ReturnDate(Format) 'As String Dim dteDateToday 'As Date 'Today's date Dim varThisMonth 'As Variant 'Numeric representation of current month Dim varThisDay 'As Variant 'Numeric representation of current day of month Dim varThisYear 'As Variant 'Numeric representation of current year dteDateToday = Date() varThisMonth = Month(Date) IF varThisMonth < 10 THEN varThisMonth = "0" & varThisMonth END IF varThisDay = Day(Date) IF varThisDay < 10 THEN varThisDay = "0" & varThisDay END IF varThisYear = Year(Date) SELECT CASE Format CASE "FILENAME" ReturnDate = varThisMonth & varThisDay & varThisYear CASE ELSE ReturnDate = varThisMonth & "/" & varThisDay & "/" & varThisYear END SELECT END FUNCTION %>