Results 1 to 2 of 2

Thread: Server.CreateObject("Microsoft.XMLHTTP")

  1. #1
    Join Date
    Dec 1969

    Default Server.CreateObject("Microsoft.XMLHTTP")

    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> "GET", strURL, False<BR> objHTTP.send &#039;Get it.<BR> strReturn = objHTTP.responseText<BR> End If<BR> HTTPGet = strReturn <BR>End Function

  2. #2
    supriya Guest

    Default Microsoft.XMLHTTP

    I have used this component and have no problem with it. Is the file name specified in strURL <BR>(like http://webservername/filename.txt)?<BR><BR>Also put in a "on error resume next" before the send command and check for the status:<BR>strStatus=objHTTP.statusText<BR>statCod e=objHTTP.status<BR><BR>

Posting Permissions

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