<% strCurDate = DateAdd("h", Application("serverTimeOffset"), Now()) strBrowser = Request.ServerVariables("HTTP_USER_AGENT") strHost = Request.ServerVariables("REMOTE_HOST") If strHost = "" Then strHost = Request.ServerVariables("REMOTE_ADDR") End If strReferer = Request.ServerVariables("HTTP_REFERER") strFormBody = "BROWSER:" & strBrowser & VbCrLf strFormBody = strFormBody & "REMOTE HOST:" & strHost & VbCrLf strFormBody = strFormBody & "REFERER:" & strReferer & VbCrLf strYear = Year(Now) strMonth = Month(Now) If Len(strMonth) = 1 Then strMonth = "0" & strMonth End If strServerPath = Server.MapPath(Request.ServerVariables("SCRIPT_NAME")) strServerPath = Replace(strServerPath, "timegen\download_pro.asp", "") strServerPath = Replace(strServerPath, "wwwRoot\", "") If inStr(strServerPath, "inetpub") Then strLogFile = "data\logs\timegen_" & strYear & strMonth & ".txt" '" Else strLogFile = "logs\timegen_" & strYear & strMonth & ".txt" '" End If 'response.write (strServerPath & strLogFile) 'response.end Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim objFS Set objFS = Server.CreateObject("Scripting.FileSystemObject") If objFS.FileExists(strServerPath & strLogFile) = True Then Set objTextS = objFS.OpenTextFile(strServerPath & strLogFile, ForAppending, False) Else 'If file doesn't exist, create it... Set objTextS = objFS.CreateTextFile(strServerPath & strLogFile, ForReading) objTextS.WriteLine "type,date,host,referer,browser" End If strLogLine = "DOWNLOAD PRO" & "," & strCurDate & "," & strHost & "," & strReferer & "," & strBrowser objTextS.WriteLine strLogLine objTextS.Close Response.Redirect ("TimeGenPro_Install.exe") %>