Blog literacki, portal erotyczny - seks i humor nie z tej ziemi
Sub Session_OnEnd
Dim objDNS
Dim conn
Dim hostname
Dim GMT
set objDNS = server.createobject("INet.DNS.1")
objDNS.ip = request.servervariables("remote_addr")
If objDNS.Host <> "" Then
hostname = objDNS.Host
Else
hostname = request.servervariables("remote_addr")
End If
GMT = Cstr (dateadd("h", 6, now()))
set conn = server.createobject ("adodb.connection")
conn.open "IISLog", "sa", "twoje_haslo"
SQL = "update iislog..sessions set session_end = '" & GMT _
& "', hostname = '" & hostname & "'"
SQL = SQL & " where Session_id = " & cstr(Session("session_id"))
conn.Execute SQL
End Sub