• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

Having a vb.net program log into a website


I'm writing a personal news aggregator that pulls press releases from some of my favorite news websites, but I've come across a problem: some websites require you to log in before accessing their content.

BusinessWire.com, for example, will tell me the URL of a story via their RSS feed, but when I go to the address I will only see the story if I'm logged in.  Otherwise, I see some generic login page.

I have a function GetHTML(url) that grabs the HTML from any url, but if I try to do that on a businesswire page, I just get the HTML from the login page.  Is there any way I can have my program "log in" so that when it retrieves the HTML it actually gets page containing the article I'm looking for and not the login page?  I'm assuming the "logged in" status is done using cookies... can the VB internet functions have their own cookies?

Here's a sample URL from businesswire that will only show you the story if you're logged in:

1 Solution

Using HTTPPost method, you can POST the login credentials to that page and mimick user behaviour.

Hope this helps


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now