ASP做聊天室,判断客户'掉电'.......(只剩5分了)
我用ASP做聊天室,在判断客户是否掉电时始终不成功,请各位指导。
我在主框架中创建一定时刷新的页面,然后用If Not Response.IsClientConnected Then语句来判断,但总是不行,源程序如下:
<%@ language="VBScript"%>
<html>
<head>
<meta http-equiv="refresh" content="3"><title>New Page 1</title>
</head>
<%
response.write("Hello world!")
If Not Response.IsClientConnected Then
Application.Lock()
Application("Chat_show")="<b>[公告]</b>"&Session("UserName")&"异常离开<BR>"
Application.UnLock()
Shutdownid = Session.SessionID
Shutdown(Shutdownid)
End If
%>
<body>
</body>
</html>