xmlhttp支持https调用

原来我还以为xmlhttp不支持https的协议,今天测试了一下完全可以
简直是太好了。强大啊。如果你还不知道那个phpCookie的功能证明你不爱来本站

Dim phpCookie
phpCookie	="PHPSESSID=r041shr3outvnhlh87ukrmax11"
loginurl	="http://www.dnspod.cn/Auth/Login"
postdata	="login-email=XXXXX&login-password=XXXXXX"
testurl	="https://www.dnspod.cn/vip/Charge"
WScript.Echo xmlHttp(testurl,"")
Function xmlHttp(byval urlStr,byval pData)
	Dim http,pType:set http=CreateObject("WinHttp.WinHttpRequest.5.1")
	pType="GET" : If pData<>"" Then pType="POST"
	http.SetTimeouts 10000,10000,10000,10000
	http.Option(6)=0
	http.open pType,urlStr,False
	If postype="POST" Then http.setRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded"
	If phpCookie<>"" Then http.SetRequestHeader "Cookie",phpCookie
	http.Send (pData)
	xmlHttp = http.ResponseText
	Set http=Nothing
End Function

, ,