日期:2014-05-16  浏览次数:21146 次

asp语言中,可以通过httpclient以get或者post方式发送请求吗
asp语言中,可以通过httpclient以get或者post方式发送请求吗,如果可以,方便给我个例子吗?我的需求是在把在我的网站引入欧飞的充值接口,然后让那个网站获取到的IP为我的服务器的IP,而不是各个用户具体的IP。他们获取的IP总是我当前电脑的IP,而不是服务器的IP,怎样才能让他获取服务器的IP呢?哪位帮帮忙。。。。。 
ASP

------解决方案--------------------
一google一堆啊

http://www.codesky.net/article/201112/123257.html
------解决方案--------------------
MSXML2.serverXmlHttp
------解决方案--------------------
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then 
  exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear 
end function

Function BytesToBstr(body,Cset)
  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

------解决方案--------------------
Request.ServerVariables("LOCAL_ADDR")
这个获取的就是服务器IP
------解决方案--------------------
你与他们客服联系吧?让他们提供相关的资料给你