asp如何POST数据到HTTPS网站

lzw858 2012-07-04 02:00:53
打开https的网站要弹出安全警告,将要使用证书,直接确定就可以了,
网站可以抓取数据,请问如何用ASP ,Post数据上去?
...全文
156 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dogfish 2012-07-05
  • 打赏
  • 举报
回复
这个好像没有屏蔽掉那个警告的。
lzw858 2012-07-04
  • 打赏
  • 举报
回复
Function GetBody() '飘易-获取远程IP地址POST信息
Set https = Server.CreateObject("MSXML2.XMLHTTP")
With https
.Open "Post", "https://ww.a.rvletSPEC.Login", False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send "isIE=yes&jsON=on&PSWD=93&SMP=0&USER=zb&usertype=OPRM"
GetBody = .ResponseBody
End With
GetBody = BytesToBstr(GetBody,"GB2312")
Set https = Nothing
End Function

Function BytesToBstr(body,Cset) '转换GB2312
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

Response.Write GetBody()

用这个代码测试了,只有HTTp成功,HTTPS就返回空白内容了

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧