Programatically opening a web page - then extracting some info from the page

Posted on 2006-04-22
Last Modified: 2010-04-23
I would like to create a simple windows application that will once every hour-or-so will open a web browser to a specific page, and capture and store to a variable a specific value from the page.

The value is found in the page's source as part of an image link(SRC), but not shown on the page itself.

Any suggestions to point me in the right direction?
(Specifically opening the web page programatically and the extraction of the value within the page's source)

Question by:DalerTheWhaler
    LVL 6

    Assisted Solution

    I am not sure , I understand you correctly or not, but it seems that you want to open a webpage in regular time, then you could use a timer and a line process.
    and then another timer kill this process when it finished its work
    but it is better that you open another form and close it instead of using a web page, but I am not sure what your project is exactly
    LVL 10

    Accepted Solution

    the following function reads all the html content from the URL

    if u had some name or id for your variable you can get the URL using Regual expressions.


        Public Function GetHTML(ByVal Url As String) As String
                Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Url), HttpWebRequest)
                Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)

                Dim htmlContentStream As New StreamReader(response.GetResponseStream())
                GetHTML = htmlContentStream.ReadToEnd()


            Catch ex As Exception
            End Try
        End Function


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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.

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now