Retrieve Data from another webpage besides XML

V

Vanessa

I have a question, is that any other way to retrieve data from another
webpage besides using XML object? Because I am using XML object now but give
me so much problems.

If I used MSXML2.ServerXMLHTTP object, it gives me time out error:
msxml3.dll error '80072ee2'
The operation timed out

If I used Microsoft.XMLHTTP object, it will hang IE!

In both cases, I have to wait for half an hour or more in order for the XML
object to be working again.

Actually both webpages that's communicating are hosted at the same machine.
The main site (ex. aa.domain.com) points to particular folder under it, while
another one (ex. bb.domain.com) points to another folder which is two levels
up to the first one.

Please help!!
 
C

Curt_C [MVP]

If both sites/pages are in your control why not rethink the way you are
approaching? Perhaps have both use a shared INCLUDE file, so they may share
the content?
 
V

Vanessa

Thanks Curt!

But I need to pass the querystring dynamically into the URL (in a loop
actually), so I guess INCLUDE can't be used. :(

Any more help from anyone? please help me out on this....

will be liked this:

at test.asp at aa.domain.com

......
do while <not end of loop>
do something to get value or to define value of ID and CurrentState for
example
.....
Response.Buffer = True
PostURL = "http://bb.domain.com/xml/whatever.asp?ID=" &ID&
"&CurrentState=" &CurrentState
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", PostURL, False,"",""
xml.Send
dataNeeded = xml.responseText
Set xml = Nothing
....
process something based on values of dataNeeded from bb.domain.com
....
loop
 
B

Bob Barrows [MVP]

I concur with Curt on this.

It sounds like you have some code in that whatever.asp page that returns
some values needed by the calling page, right? So encapsulate that code in a
function, place the function in an INCLUDE file, and include the file in
whatever page needs to use that function.

Another possibility is to create a Web Service. You should Google that so
you can see if you are able to utilize that functionality. It's not too hard
to do, but there is a learning curve involved.

Bob Barrows
 
V

Vanessa

Thank You Bob and Curt, I have tried this today and it works!
This really free me from the hassle and the pain of using XMLHTTP. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top