Solved

Cache web pages with VB?

Posted on 2004-08-28
3
147 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
Comment Utility
use inet to get the source and save it as a text file -.-...
0
 
LVL 8

Accepted Solution

by:
mladenovicz earned 250 total points
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now