Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get data from a password protected webpage 2

Status
Not open for further replies.

NorbertBehrens

Programmer
May 14, 2003
2
DE
Hi,
I wrote a dll to retrieve data from a table of a web page. That works fine. But there are also tables protected by some Javescript code. The scriptcode get's the login/password and makes a "document.login_form.submit()". How could I emulate this behavior within my dll. To give GetHttpConnection() the login/password parameter doesn't work, because the page isn't direct protected. There shouldn't be any interaction.
Thanx, Norbert
 
document.login_form.submit()

based on that part of your post it seems the login/password values are being submitted via POST to the target resource, so that is what you would have to do as well, yes?

-pete
I just can't seem to get back my IntelliSense
 
>> To give GetHttpConnection() the login/password parameter doesn't work

To clarify palbano's response, let me say that there are two different schemes of password protection commonly used on the web.

The first is a functionality built in to the web server. This is known as "basic authentication". When a controlled URI is accessed on a web browser, a dialog will pop up: go to for an example. The "login/password parameter" is used to supply THIS type of authentication.

However, the more widely used protection scheme involves a POST form--and optionally, cookies.

For example, the Tek-Tips logon uses this method. When you enter your user name and password and click "GO!" your browser sends a POST request like this:

POST /passcheck.cfm
.....
Handle=apatterno&Password=XXXXXXXX

And then the script at passcheck.cfm sets the login cookie and then redirects you to the Threadminder.

So my point is, if that is the way your password-protected HTTP site works, then you'll have to pass the appropriate username/password parameters in a POST request.

I REALLY hope this helps.
Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top