Solved

Cache web pages with VB?

Posted on 2004-08-28
3
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL VB connection works in one PC and doesn't in another 15 80
Help me. 3 79
VB6 - Cannot type when doing an extract from MSHFlexgrid to Excel 6 48
VB6 Enviroment 3 38
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 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