api.asp
-----------------------------------------------
<%
DIM Http
DIM Result
DIM Str
DIM URL
DIM Reg
set Reg = new PostForm
Set Http = SERVER.CREATEOBJECT("Microsoft.XMLHTTP")
URL = "http://smsapi.com.cn/apis.asp"
Http.Open "POST",URL,FALSE
Http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
call Reg.AddItem("guestname","杨帆")
call Reg.AddItem("connt","connnnnnt")
Str = Reg.form
Http.send(Str)
Result = Http.ResponseText
Set Http = NOTHING
response.write Result
Class PostForm
Public form
Function AddItem(Key,Value)
on error resume next
dim TempStr
IF form = "" THEN
form = Key + "=" + Server.URLEncode(Value)
ELSE
form = form + "&" + Key + "=" + Server.URLEncode(Value)
END IF
End Function
End Class
%>
apis.asp
-------------------------------------
<%
Response.CharSet = "GB2312"
ResponseText=request("guestname") & request("connt")
response.write ResponseText
%>