Page 1 of 1

Sending vars to http login dialog

PostPosted: Fri Jul 25, 2014 9:24 pm
by stu
Is there any way of sending vars (user, password) to the typical http login dialog... for example the one seen here:

Code: Select all
http://blog.stevensanderson.com/2008/08/25/using-the-browsers-native-login-prompt/

Re: Sending vars to http login dialog

PostPosted: Sat Jul 26, 2014 10:06 am
by virger
Hi, the simple way ussing PHP, in form/buttom Submit
www.myserver.recibedata.php?var1=name&var2=sex...
and the php
$name = $_REQUEST['name'];
$fm=$_REQUEST['sex'];
bla..bla
FRom COSTA RICA
PURA VIDA
WE ARE LEGEND

Re: Sending vars to http login dialog

PostPosted: Sat Jul 26, 2014 8:38 pm
by stu
So theres no way of doing it within the NB envoroment? can you produce an example please, I cant manage to introduce such PHP into NB

Re: Sending vars to http login dialog

PostPosted: Sun Jul 27, 2014 7:12 am
by Tony Kroos
please provide a link to a website/login form you want to log into

Re: Sending vars to http login dialog

PostPosted: Sun Jul 27, 2014 8:16 pm
by stu
Code: Select all
http://***********/cgi-bin/usage

Re: Sending vars to http login dialog

PostPosted: Sun Jul 27, 2014 9:43 pm
by David de Argentina
try:

http://userid:password@usage.sure.co.fk/cgi-bin/usage

My defaulted cent,
David de Argentina

Re: Sending vars to http login dialog

PostPosted: Sun Jul 27, 2014 11:44 pm
by stu
seems to work ok on the web browser but on NB it retrieves a 404 error after:

Code: Select all
setvar "[usr]" "user"
setvar "[pwd]" "password"
InternetGet "http://[usr]:[pwd]@**************/cgi-bin/usage" "[temp]" "HideProgress"

Re: Sending vars to http login dialog

PostPosted: Sun Jul 27, 2014 11:53 pm
by HPW
Try:

Code: Select all
InternetGet "!http://[usr]:[pwd]@usage.sure.co.fk/cgi-bin/usage" "[temp]" "HideProgress"

Re: Sending vars to http login dialog

PostPosted: Mon Jul 28, 2014 12:28 am
by stu
Thanks for the reply, still not working though...

Re: Sending vars to http login dialog

PostPosted: Mon Jul 28, 2014 9:54 am
by virger
HI..
Sorry, but I do not understand the issue but this way I enter NeoBook-Forum

1) Create a 'WebBrowser1'
2) Internet Address or HTML_File: http://www.neosoftware.com/community/ucp.php?mode=login

3) Button with 'actions':
3a) BrowserSetElement "WebBrowser1" "username" "my_user_name"
3b) BrowserSetElement "WebBrowser1" "password" "my_password"

4) Press 'Login' button

Ready

FROM COSTA RICA
PURA VIDA
WE ARE LEGEND
BRAZIL-2014

Re: Sending vars to http login dialog

PostPosted: Mon Jul 28, 2014 11:25 pm
by schmutly
I just stick them ALL in one button and be done with it.
BrowserSetElement "WebBrowser1" "username" "yourname"
BrowserSetElement "WebBrowser1" "password" "password1234"
SendKeys "[WebBrowser1]" "{Enter}"

Re: Sending vars to http login dialog

PostPosted: Tue Jul 29, 2014 9:14 pm
by Tony Kroos
it's not a browser elements but a native Windows form, so mentioned above will not work.
Looks like you have to get window's handle and pass messages to it using WinAPI.

Re: Sending vars to http login dialog

PostPosted: Wed Jul 30, 2014 3:41 am
by dec
Hello,

What about the HTTP related global variables? From the help file:

[HTTPUserID]
[HTTPUserPassword]


Use these two variables to specify the user ID and password when using any of the HTTP Actions with protected servers or folders. For example:

Code: Select all
SetVar "[HTTPUserID]" "nancy123"
SetVar "[HTTPUserPassword]" "applesauce"
DownloadFile...


Re: Sending vars to http login dialog

PostPosted: Wed Jul 30, 2014 10:27 pm
by stu
dec wrote:Hello,

What about the HTTP related global variables? From the help file:

[HTTPUserID]
[HTTPUserPassword]


Use these two variables to specify the user ID and password when using any of the HTTP Actions with protected servers or folders. For example:

Code: Select all
SetVar "[HTTPUserID]" "nancy123"
SetVar "[HTTPUserPassword]" "applesauce"
DownloadFile...



Works like a charm! its exactly what I was looking for, thanks.

And thanks everybody for your answers, im pretty sure will help myself and others in the future.