Re: Downloading webpage

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



BodiKlamph@xxxxxxxxx wrote:
Hi

I have some VB code that uses URLDownloadToFile to grab a simple HTML
file from a 3rd party website. The issue is that the website will
only give me that file if I've logged in first.

So what I did was put an IE control on my form, navigate to the login
page, script my way through putting in the user/pwd and THEN use
URLDownloadToFile to take the page I actually want.

The whole login procedure seems way too overkill for such an easy
task.

So what I did was create a barebones HTML file of just the <form>
login stuff (with an onload command to submit the html form) and put
that on my own website. I was hoping that I could then use
URLDownloadToFile and that would "execute" the html file.

So basically, I'm looking for a simple way to login to the 3rd party
site so I can take the necessary files. Are there any APIs that will
do that? Or should I be looking elsewhere?

There is only one standard way to log in to remote web sites, and very few actually use it.
If the site uses a login form in the page itself, you can try manually building the http request that it would send, or use your existing method.

If the site supports normal HTTP authentication, then you can use http://user:password@hostname/resource

--
Dean Earley (dean.earley@xxxxxxxxxxx)
i-Catcher Development Team

iCode Systems
.



Relevant Pages

  • Downloading webpage
    ... I have some VB code that uses URLDownloadToFile to grab a simple HTML ... The issue is that the website will ... So what I did was put an IE control on my form, navigate to the login ...
    (microsoft.public.vb.winapi)
  • web.config in subdirectory security problem...
    ... website for login for some admin code for the website. ... pushed to the browser other then the html, ...
    (microsoft.public.dotnet.security)
  • Re: OT- building a lightwave website
    ... directly to people who use HTML, flash,dreamweaver,inDesign etc everyday. ... Im assuming that you are more of the design angle. ... In programming, it either works or it doesnt, ... figure out how to convert it into a website. ...
    (comp.graphics.apps.lightwave)
  • Re: OT- building a lightwave website
    ... website with a blog, a slideshow and a video page without trying to ... figure out how you paste code into an html page. ... for advertising banners and such....and flash video too. ... LOL Some of the Photoshop templates are great! ...
    (comp.graphics.apps.lightwave)
  • Re: Web Animation and Sound Advice Sought
    ... using raw HTML coding. ... what's the usual learning curve with Java Script? ... to create an animation with a sound file in a couple of days? ... upon someone landing on my website, ...
    (misc.writing)