SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help With Microsoft XMLHTTP

    I am using Microsofts XMLHTTP to attempt to grab pages off of a remote server. Some servers it works, some it doesn't, it just comes back with basic HTML structure. I am using a VB component, but that is not related to the problem. A snippit of my code is below.

    When I have http://www.sitepoint.com/ as my strFilePath data, I get this such error.

    Code:
    Set objXML = New XMLHTTP
        
    objXML.Open "GET", strFilePath, False
    objXML.setRequestHeader "Content-type", "text/html"
        
    If objXML.readyState <> 4 Then
        objXML.waitForResponse 20
    End If   
    
        objXML.send
    
    strFileContents = objXML.responseText
            
    Set objXML = Nothing

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't know much about it, but maybe this will help - http://www.4guysfromrolla.com/webtech/110100-1.2.shtml
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  3. #3
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I found that yesterday, but it doesn't really help much. Thanks anyways.

  4. #4
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked fine for me... I got the page returned...

    http://www.oreosnbeer.com/sp/blah.asp

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the web server behind a proxy? If so, a special proxy configuration program for the XML components (called ProxyConfig) needs to be run before XMLHTTP will work. Get it here:
    http://msdn.microsoft.com/code/defau...mpositedoc.xml

    However the fact that it works at all is very odd. It shouldn't work at all if it hasn't been configured. Perhaps this is not the cause of the problem then...!?


    M@rco

  6. #6
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm... it does work now that I changed my VB code over a little bit and implemented the features to script timeouts and such. Thanks everyone for their help.


Bookmarks

Posting Permissions

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