VBS get,post函数

Function gethttp(gethttp_url)
Dim http_get
Set http_get=Server.CreateObject("MSXML2.ServerXMLHTTP")
http_get.Open "GET",gethttp_url,False,"",""
http_get.Send
gethttp = http_get.responseText
Set http_get=nothing 
  End Function
  
  Function posthttp(posturl,params)
    Dim oauth_http
Set oauth_http=Server.CreateObject("MSXML2.ServerXMLHTTP")
oauth_http.Open "POST",posturl,False,"",""
oauth_http.Send(params)
If oauth_http.Status = "200" Then
posthttp = oauth_http.responseText
Else
posthttp = http.Status & "<br />" & oauth_http.responseText
End If
Set oauth_http=nothing 
  End Function

posted @ 2013-08-01 18:47  坚固66  阅读(930)  评论(0编辑  收藏  举报