How do I read html source from a URL without saving it to HD?

J

jhester

I am using Access 2003. I want to write a module that will be able to read
source from webpages directly without me having to save the source onto my
hard drive. I can't seem to find this.
 
A

Alex Dybenko

you can try to do so using MSXML2 library, if source is XML -then you can
certainly do. look at msdn.microsoft.com for more info.
Also i don't see any problem saving file to disk first, as you can always
delete it.
 
R

Rick Brandt

jhester said:
I am using Access 2003. I want to write a module that will be able to read
source from webpages directly without me having to save the source onto my
hard drive. I can't seem to find this.

You can send an HTTP GET Request to the URL using the MSXML.dll library. The
HTML will be returned in the request response which you can stuff into a string
variable and then do with what you want.
 
J

jhester

Rick Brandt said:
You can send an HTTP GET Request to the URL using the MSXML.dll library. The
HTML will be returned in the request response which you can stuff into a string
variable and then do with what you want.
This sounds like the solution to my problem, but I don't know how to send
requests using dll libraries. Can you point me to a place that explains how
that is done?
 
R

Rick Brandt

jhester said:
This sounds like the solution to my problem, but I don't know how to
send requests using dll libraries. Can you point me to a place that
explains how that is done?

Dim oHttpPost As Object
Dim strResponse as String

Set oHttpPost = CreateObject("Microsoft.XMLHTTP")
oHttpPost.Open "GET", "Your URL", False
oHttpPost.Send
strResponse = oHttpPost.responseText
 
Top