SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Help With Microsoft XMLHTTP
-
Jan 22, 2002, 23:02 #1
- 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
-
Jan 23, 2002, 00:37 #2
- 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
-
Jan 23, 2002, 07:34 #3
- 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.
-
Jan 23, 2002, 08:42 #4
- 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
-
Jan 23, 2002, 10:12 #5
- 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
-
Jan 23, 2002, 16:18 #6
- 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