function http_GET(strUrl,strData)
'strUrl = "http://58.37.101.10/edit.asp"
'strData = "a=1&b=2"
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
'Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP")
httpsendurl = strUrl & "?" & strData
xml.Open "GET", httpsendurl, False
xml.Send
sta = bytes2BSTR(xml.responseBody)
Set xml = Nothing
http_GET = sta
end function
Function bytes2BSTR(arrBytes)
strReturn = ""
arrBytes = CStr(arrBytes)
For i = 1 To LenB(arrBytes)
ThisCharCode = AscB(MidB(arrBytes, i, 1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(arrBytes, i+1, 1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
function http_POST(strUrl,strData)
'strUrl = "HTTP://58.33.53.45/abc.asp"
'strData="a=1&b=2"
set Http=server.createobject("MicroSoft.XMLHTTP")
Http.open "POST",strUrl,false
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send strData
http_POST = http.responsetext
set http=nothing
end function