Can I have a simple PHP script that checks Username and Password that I can use in AMS.
Requesting a PHP script.
Collapse
X
-
here u go
-- Retrieve Username and Password
sUsername = Input.GetText("Input_Username");
sPassword = Input.GetText("Input_Password");
-- Convert user/pass combo to MD5 digests
sUsernameMD5 = Crypto.MD5DigestFromString(sUsername);
sPasswordMD5 = Crypto.MD5DigestFromString(sPassword);
-- Initialize variables for submit action
sCheckScriptURL = "http://www.yourdomain.com/check_user.php";
tValuesToPass = {username_md5 = sUsernameMD5, password_md5 = sPasswordMD5};
nSubmitMethod = SUBMITWEB_POST;
nTimeout = 20;
nPort = 80;
tAuthData = nil;
tProxyData = nil;
-- Submit to the web
sResult = HTTP.Submit(sCheckScriptURL, tValuesToPass, nSubmitMethod, nTimeout, nPort, tAuthData, tProxyData);
-- Check the result ('1' is success)
if sResult == "1" then
-- The user is authenticated
Page.Jump("Page2");
else
-- The user is not authenticated.
Dialog.Message("ERROR", "That user/pass combo is invalid", MB_OK, MB_ICONSTOP);
endAttached Files
-
Comment