ManagedCloud-Hosting Posted February 3, 2021 Share Posted February 3, 2021 Hi, For CPanel, using php, we can create a login url / Button thru username password / api, which allows an end user to login to his cpanel account just by clicking the button. How can we do this with Direct Admin ? How to add this with my WHMCS, please help... Thanks 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted February 10, 2021 Author Share Posted February 10, 2021 Hello, Anyone having experience with this - I want my WHMCS users to click and login to their Direct Admin Account from the services page - however I don't want to do this from WHMCS System Settings -> Servers I want to do this using a Button using username password / api, which allows an end user to login to his cpanel account just by clicking the button. Is this possible ? can anyone please help...Thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted February 10, 2021 WHMCS Support Manager Share Posted February 10, 2021 Hi @ManagedCloud-Hosting, DirectAdmin have an API which you could potentially leverage in your custom code: https://help.directadmin.com/item.php?id=523 This isn't currently a function that's implemented in the DirectAdmin module, but is potentially something we can look at if there's demand in future. 1 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted February 11, 2021 Author Share Posted February 11, 2021 Thank you @WHMCS John 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted March 8, 2021 Author Share Posted March 8, 2021 (edited) Hi, I was checking with the DA help pages - I found two scripts, how to make them work ? Please help...thanks -------------------------- https://community.directadmin.com/threads/custom-login-script.37661/ <style> *{ FONT-SIZE: 8pt; FONT-FAMILY: verdana; } b { FONT-WEIGHT: bold; } .listtitle { BACKGROUND: #425984; COLOR: #EEEEEE; white-space: nowrap; } td.list { BACKGROUND: #EEEEEE; white-space: nowrap; } </style> <table cellspacing=1 cellpadding=5> <tr> <td class=listtitle colspan=2>Please enter your Username and Password</td> </tr> <form action="" method="POST" name="form"> <input type=hidden name=referer value="/"> <input type=hidden name=FAIL_URL value="http://www.yourdomain.com/login_failed.html"> <input type=hidden name=LOGOUT_URL value="http://www.yourdomain.com/logged_out.html"> <tr> <td class=list align=right>Website:</td><td class=list>http://<input type=text name=website id="website">:2222</td> </tr> <tr> <td class=list align=right>Username:</td><td class=list><input type=text name=username></td> </tr> <tr> <td class=list align=right>Password:</td><td class=list><input type=password name=password></td> </tr> <tr> <td class=listtitle align=right colspan=2><input type=submit value='Login' onclick="login();"></td> </tr> </form> </table> <script type="text/javascript"> function login() { website = document.getElementById('website').value; document.form.action = 'http://'+website+':2222/CMD_LOGIN'; document.form.submit(); return false; } </script> -------------------------- https://help.directadmin.com/item.php?id=61 <style> *{ FONT-SIZE: 8pt; FONT-FAMILY: verdana; } b { FONT-WEIGHT: bold; } .listtitle { BACKGROUND: #425984; COLOR: #EEEEEE; white-space: nowrap; } td.list { BACKGROUND: #EEEEEE; white-space: nowrap; }</style><table cellspacing=1 cellpadding=5><tr> <td class=listtitle colspan=2>Please enter your Username and Password</td></tr><form action="http://www.yourdomain.com:2222/CMD_LOGIN" method="POST" name="form"><input type=hidden name=referer value="/"><input type=hidden name=FAIL_URL value="http://www.yourdomain.com/login_failed.html"><input type=hidden name=LOGOUT_URL value="http://www.yourdomain.com/logged_out.html"><tr> <td class=list align=right>Username:</td><td class=list><input type=text name=username></td></tr><tr> <td class=list align=right>Password:</td><td class=list><input type=password name=password></td></tr><tr> <td class=listtitle align=right colspan=2><input type=submit value='Login'></td></tr></form></table> -------------------------- Edited March 8, 2021 by ManagedCloud-Hosting 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.