PDA

View Full Version : Loading a webpage the requires a password


jrak
03-15-2006, 03:27 PM
I’m developing an application that will use Autplay Media Studio in conjunction with a website that requires a password. I’d like to “automate” the login process so that a user enters his or her user name and password once. This data would be stored in a text file on the user’s hard drive and then called whenever a webpage is loaded by autoplay. Is this something that is doable using the HTTP.submit action?

bule
03-15-2006, 04:35 PM
Yes it is. I found the solution on this forum not long ago.
However, this depends on the authentication type your server is using.

This one is for HTTP Password Authentication type:


--user data
tAuthData = {};
tAuthData.UserName = INIFile.GetValue(_SourceFolder.."\\settings.ini", "httpsettings", "username");
tAuthData.Password = INIFile.GetValue(_SourceFolder.."\\settings.ini", "httpsettings", "password");
-- intialize a connection with a server to automate logon
nOnlineCheck = HTTP.GetFileSize("http://yourpage.com/someimage.jpg", MODE_BINARY, 20, 80, tAuthData, nil, nil);
-- load the page from the server
Web.LoadURL("Web1", "http://yourpage.com");

Please note that intialization is requred only once per application run.