<!--#include file="ip.asp"-->
<%
function getHTTPPage(url) 
dim Http 
set Http=server.createobject("MSXML2.XMLHTTP") 
Http.open "GET",url,false 
Http.send() 
if Http.readystate<>4 then  
exit function 
end if 
getHTTPPage=bytesToBSTR(Http.responseBody,"utf-8") 
set http=nothing 
if err.number<>0 then err.Clear  
end function
Function BytesToBstr(body,Cset) 
dim objstream 
set objstream = Server.CreateObject("adodb.stream") 
objstream.Type = 1 
objstream.Mode =3 
objstream.Open 
objstream.Write body 
objstream.Position = 0 
objstream.Type = 2 
objstream.Charset = Cset 
BytesToBstr = objstream.ReadText  
objstream.Close 
set objstream = nothing 
End Function
Private Function bianma(szInput)
    Dim wch, uch, szRet
    Dim x
    Dim nAsc, nAsc2, nAsc3
    If szInput = "" Then
        bianma= szInput
        Exit Function
    End If
    For x = 1 To Len(szInput)
        wch = Mid(szInput, x, 1)
        nAsc = AscW(wch)
        If nAsc < 0 Then nAsc = nAsc + 65536
        If wch = "+" then
            szRet = szRet & "%2B"
        ElseIf wch = "%" then
            szRet = szRet & "%25"
        ElseIf (nAsc And &HFF80) = 0 Then
            szRet = szRet & wch
        Else
            If (nAsc And &HF000) = 0 Then
                uch = "%" & Hex(((nAsc \ 2 ^ 6)) Or &HC0) & Hex(nAsc And &H3F Or &H80)
                szRet = szRet & uch
            Else
                uch = "%" & Hex((nAsc \ 2 ^ 12) Or &HE0) & "%" & _
                Hex((nAsc \ 2 ^ 6) And &H3F Or &H80) & "%" & _
                Hex(nAsc And &H3F Or &H80)
                szRet = szRet & uch
            End If
        End If
    Next
    bianma = szRet
End Function
xiaoshi=""&hour(time())
fenzhong=""&minute(time())

if Len(xiaoshi)<2 Then
xiaoshi="0"&hour(time())
end if
if Len(fenzhong)<2 Then
fenzhong="0"&minute(time())
end if
qun="554809851"
msg="[CQ:emoji,id=128225]Tips：\r     来自"&jiema(cou&pro&city)&"("&ip&")"&"的朋友于"&xiaoshi&":"&fenzhong&"访问了你的网站！"
msg_url="http://api.ggzz.cc/msg.asp?msg="&bianma(msg)&"&qun="&qun
getHTTPPage(msg_url) 
%>
