我需要为下面的请求添加代理。如果有人知道添加此代码的最佳方法,请不要重做太多,请告诉我。感谢
TheFeed = "http://www.google.com/newsfeed.xml"
objXML = Server.CreateObject ("MSXML2.ServerXMLHTTP.3.0")
objXML.Async = False
objXML.SetProperty ("ServerHTTPRequest", True)
objXML.setRequestHeader ("User-Agent", "asp httprequest")
objXML.ResolveExternals = True
objXML.ValidateOnParse = True
objXML.Load(TheFeed)
答案 0 :(得分:1)
TheFeed = "http://www.google.com/newsfeed.xml"
objXML = Server.CreateObject ("MSXML2.ServerXMLHTTP.3.0")
objXML.Async = False
objXML.SetProperty ("ServerHTTPRequest", True)
objXML.setRequestHeader ("User-Agent", "asp httprequest")
objXML.ResolveExternals = True
objXML.ValidateOnParse = True
objXML.setProxy 2, "http=myProxyServer:80", ""
objXML.Load(TheFeed)