接下来使用Ajax远程读取这个网页就可以跨站点登陆
比如
blog.
下检测是否登陆
Verifylong.asp
<%
Function IsCreateActiveXObject(ActiveName)
On Error Resume Next
Dim TestObj
Set TestObj=Server.CreateObject(ActiveName)
IF Err.Number<>0 Then
IsCreateActiveXObject=True
Else
IsCreateActiveXObject=False
End IF
Set TestObj=Nothing
End Function
Dim ObjXMLHTTP
Dim xmlDom
IF IsCreateActiveXObject("Msxml2.ServerXMLHTTP") Then
Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
Else
IF
IsCreateActiveXObject("Microsoft.XMLHTTP") Then
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
IF IsCreateActiveXObject("Microsoft.XMLDOM") Then
set xmlDom=Server.CreateObject("Microsoft.XMLDOM")
Else
Response.Redirect "Error.asp?Msg=服务器不支持Microsoft.XMLDOM组件"
End IF
Else
Response.Redirect "Error.asp?Msg=服务器不支持Ajax组件"
End IF
End IF
objXmlHttp.open "GET","http://www.,false
objXmlHttp.send()
xmlDom.loadXml objXmlHttp.responseText
Set RootEml=xmlDom.documentElement
Session("UserName")=RootEml.ChildNodes.Item(0).text
Session("Password")= RootEml.ChildNodes.Item(1).text
IF Session("UserName")="Null" And Session("Password")="Null Then
Response.Redirect "Error.asp?Msg=您还没有登陆请先在[url]www.[/url]登陆"
End IF
%>