Solved

Cache web pages with VB?

Posted on 2004-08-28
3
170 Views
Last Modified: 2010-05-02
I want to go out and cache several URLs once a week. I have a table of URLs that I want to cache. What is the easiest way to do this? After I cache the pages, I have another app that will scan the page for text and put that into another table. Any suggestions?
Thanks John
0
Comment
Question by:johnmoed
3 Comments
 
LVL 4

Expert Comment

by:cachedVB
ID: 11923693
use inet to get the source and save it as a text file -.-...
0
 
LVL 8

Accepted Solution

by:
mladenovicz earned 250 total points
ID: 11924977
Try to use MSXML2.XMLHTTP40 to cache URLs

You will need reference to the Microsoft Scripting Runtime and Microsoft XMl 4.0

Option Explicit

Private Sub Command1_Click()
Dim oFSO    As New Scripting.FileSystemObject
Dim oStream As Scripting.TextStream
Dim xmlHttp As New MSXML2.XMLHTTP40

    xmlHttp.open "POST", "http://localhost/test.asp", False
    xmlHttp.send ""
    Text1.Text = xmlHttp.responseText

    Set oStream = oFSO.OpenTextFile("C:\test.html", ForWriting, True, TristateFalse)

    oStream.WriteLine (Text1.Text)

    oStream.Close

    Set oStream = Nothing
    Set oFSO = Nothing
    Set xmlHttp = Nothing

End Sub
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question