Source language: Translate to:

Sending vars to http login dialog

Questions and information about creating Internet aware NeoBook applications. Including PHP, HTML, FTP, HTTP, Email, etc.

Moderator: Neosoft Support

Sending vars to http login dialog

Postby stu » Fri Jul 25, 2014 9:24 pm

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/
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Sending vars to http login dialog

Postby virger » Sat Jul 26, 2014 10:06 am

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
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 523
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: Sending vars to http login dialog

Postby stu » Sat Jul 26, 2014 8:38 pm

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
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Sending vars to http login dialog

Postby Tony Kroos » Sun Jul 27, 2014 7:12 am

please provide a link to a website/login form you want to log into
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Sending vars to http login dialog

Postby stu » Sun Jul 27, 2014 8:16 pm

Code: Select all
http://***********/cgi-bin/usage
Last edited by stu on Wed Jan 13, 2016 5:28 am, edited 1 time in total.
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Sending vars to http login dialog

Postby David de Argentina » Sun Jul 27, 2014 9:43 pm

try:

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

My defaulted cent,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Sending vars to http login dialog

Postby stu » Sun Jul 27, 2014 11:44 pm

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"
Last edited by stu on Wed Jan 13, 2016 5:28 am, edited 1 time in total.
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Sending vars to http login dialog

Postby HPW » Sun Jul 27, 2014 11:53 pm

Try:

Code: Select all
InternetGet "!http://[usr]:[pwd]@usage.sure.co.fk/cgi-bin/usage" "[temp]" "HideProgress"
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Sending vars to http login dialog

Postby stu » Mon Jul 28, 2014 12:28 am

Thanks for the reply, still not working though...
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Sending vars to http login dialog

Postby virger » Mon Jul 28, 2014 9:54 am

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
COSTA RICA
PURA VIDA
User avatar
virger
 
Posts: 523
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: Sending vars to http login dialog

Postby schmutly » Mon Jul 28, 2014 11:25 pm

I just stick them ALL in one button and be done with it.
BrowserSetElement "WebBrowser1" "username" "yourname"
BrowserSetElement "WebBrowser1" "password" "password1234"
SendKeys "[WebBrowser1]" "{Enter}"
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Sending vars to http login dialog

Postby Tony Kroos » Tue Jul 29, 2014 9:14 pm

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.
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Sending vars to http login dialog

Postby dec » Wed Jul 30, 2014 3:41 am

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...

.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Sending vars to http login dialog

Postby stu » Wed Jul 30, 2014 10:27 pm

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.
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am


Return to NeoBook and the Internet

Who is online

Users browsing this forum: No registered users and 0 guests