如何把以下发短信的VB程序转换成Delphi程序?(0分)

  • 主题发起人 主题发起人 Pau1
  • 开始时间 开始时间
P

Pau1

Unregistered / Unconfirmed
GUEST, unregistred user!
Set objHttp = CreateObject("Microsoft.XMLHTTP")
strUrl =” http://211.139.207.145/jmms/interface/Send.
aspx“
strData= " ECode=test&Account=admin&PWD=111&SendTime=2006-07-01&Msg1=hello&Mobile1=13512345678*13512340000"
strData = strData +"&Msg2=hello2 &
Mobile2=13512340001 "
objHttp.Open "POST", strUrl, False
objHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHttp.Send strData

If objHttp.Status <> 200 then
MsgBox "调用服务出错"
else
If InStr(1, objHttp.responseText, "OK") then
MsgBox "提交成功"
else
MsgBox objHttp.responseText
End If
End If

Set objHttp = Nothing
 
Delphi支持网页编程?
 
strData= " ECode=test&amp;Account=admin&amp;PWD=111&amp;SendTime=2006-07-01&amp;Msg1=hello&amp;Mobile1=13512345678*13512340000"
strData = strData +"&amp;Msg2=hello2 &amp;
Mobile2=13512340001 "
urlstr:='';
urlstr:=urlstr+'POST /release/reappear_ok.asp HTTP/1.1'+#13#10;
urlstr:=urlstr+'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, application/vnd.ms-excel, application/msword, */*'+#13#10;
urlstr:=urlstr+'Referer: http://www.tw-jasma.com/release/reappear.asp?id=11'+#13#10;
urlstr:=urlstr+'Accept-Language: zh-cn'+#13#10;
urlstr:=urlstr+'Content-Type: application/x-www-form-urlencoded'+#13#10;
urlstr:=urlstr+'Accept-Encoding: gzip, deflate'+#13#10;
urlstr:=urlstr+'User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0;
Windows NT 5.1;
SV1)'+#13#10;
urlstr:=urlstr+'Host: www.tw-jasma.com'+#13#10;
urlstr:=urlstr+'Content-Length: 53'+#13#10;
urlstr:=urlstr+'Connection: Keep-Alive'+#13#10;
urlstr:=urlstr+'Cache-Control: no-cache'+#13#10;
urlstr:=urlstr+'Cookie: ASPSESSIONIDCCRBQTDD=OJEPGOLAPADNMKMHLFCMCGLB'+#13#10#13#10;
urlstr:=urlstr+strData;
memo5.text:=urlstr;
ClientSocket3.Socket.SendText(UrlStr);
ZeroMemory(@FBufByte,sizeof(FBufByte));
ClientSocket3.Socket.ReceiveBuf(FBufByte,sizeof(FBufByte));
memo6.text:=strpas(@FBufByte);
 
后退
顶部