English 中文(简体)
HTTP GET Request, ASP - I m loss!
原标题:HTTP GET Request, ASP - I m lost!

利用与ASP的VB文本 我正试图建立一个吉大港定居地的申请,该请求将访问一个网页,从而产生一条ASCII(非超文本)线。 然后,我想推断一下,ASCII线将包含4项由半殖民地划定的数值,重新纳入我原来的ASP网页的4项变量,以便我能够拿到这些数值,并与这些数值做些什么。

这是我想与吉大港山区GET申请网站。 其中三个价值在此无效。

我没有多少人/人了解协会,因此我有:

Dim oXMLHTTP

Dim strStatusTest

Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0")

oXMLHTTP.Open "GET", "http://www.certigo.com/demo/request.asp", False

oXMLHTTP.Send

If oXMLHTTP.Status = 200 Then

strStatusText = oXMLHTTP.responseBody

End If

但很明显,我只字不提我干什么,因为那只是一帆风顺。 我完全不了解我在这里所看到的朝正确方向发展的趋势。 请帮助!

- 林业

最佳回答

你的法典应当这样看:

Function GetTextFromUrl(url)

  Dim oXMLHTTP
  Dim strStatusTest

  Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")

  oXMLHTTP.Open "GET", url, False
  oXMLHTTP.Send

  If oXMLHTTP.Status = 200 Then

    GetTextFromUrl = oXMLHTTP.responseText

  End If

End Function

Dim sResult : sResult = GetTextFromUrl("http://www.certigo.com/demo/request.asp")

注使用ASP内的服务器XMLHTTP,XMLHTTP部件的设计是为了客户的用量,并且是在多种翻新的环境中安全使用的,如ASP。

问题回答




相关问题
How to set response filename without forcing "save as" dialog

I am returning a stream in some response setting the appropriate content-type header. The behavior I m looking for is this: If the browser is able to render content of the given content type then it ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Does HttpWebRequest send 200 OK automatically?

Background: I am implementing Paypal IPN handler. This great article on Paypal states that I am required to send a 200 OK back to Paypal after I read the response. The processing of IPN request is ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

Finding out where curl was redirected

I m using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually ...

热门标签