Error on opening XMLHTTP object

Results 1 to 2 of 2

Thread: Error on opening XMLHTTP object

  1. #1
    Join Date
    Dec 1969

    Default Error on opening XMLHTTP object

    Hi everybody<BR><BR>I&#039;m trying to create a page on which I want to check the HTML source-code of another URL. I&#039;ve got no clue of how to do this, so I started searching the web. Below is what I came up with. <BR>A call to the function should grab the html from the page and return it as a string. <BR><BR>The problem is I get an &#039;unspecified error&#039; on the line:<BR><BR> "GET", strURL, False<BR><BR>Who can help me on this one????<BR><BR>The code:<BR><BR><BR>Function HTTPGet(strURL) &#039;As String<BR>Dim strReturn &#039; As String<BR>Dim objHTTP &#039; As MSXML.XMLHTTPRequest<BR>If Len(strURL) Then<BR>Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")<BR>objHTT "GET", strURL, False<BR>objHTTP.send &#039;Get it.<BR>strReturn = objHTTP.responseText<BR>End If<BR>HTTPGet = strReturn <BR>End Function

  2. #2
    Karin van Ettinger Guest

    Default a small code error

    there&#039;s a small code error in your source nothing to do with the XMLHTTP object<BR>change <BR><BR>If Len(strURL) Then<BR>in <BR>If Len ( strURL ) &#060;&#062; 0 Then

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts