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
Solved

Cache web pages with VB?

Posted on 2004-08-28
3
177 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

829 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