Re: Downloading webpage
- From: Dean Earley <dean.earley@xxxxxxxxxxx>
- Date: Wed, 05 Nov 2008 13:37:50 +0000
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
.
- References:
- Downloading webpage
- From: BodiKlamph
- Downloading webpage
- Prev by Date: Determine drive letter from device path
- Next by Date: Re: Determine drive letter from device path
- Previous by thread: Downloading webpage
- Next by thread: DeviceIoControl problems
- Index(es):
Relevant Pages
|