hsnuwaninfo Posted September 7, 2015 Share Posted September 7, 2015 Hi, I want to use AutoAuth to automatically login to client are using whamcs API. I am using following code. $whmcsurl = "http://dev.whmcs.local/clientarea.php"; $autoauthkey = "nuwan123"; $timestamp = time(); # Get current timestamp $email = "nuwan@negete.com"; # Clients Email Address to Login $goto = "clientarea.php"; $hash = sha1($email.$timestamp.$autoauthkey); # Generate Hash # Generate AutoAuth URL & Redirect $url = $whmcsurl."?email=$email×tamp=$timestamp&hash=$hash&goto=".urlencode($goto); header("Location: $url"); exit; And given blow is link to the above code. express-web.negete.net/customer/test_auth 0 Quote Link to comment Share on other sites More sharing options...
hsnuwaninfo Posted September 7, 2015 Author Share Posted September 7, 2015 Hi, It is working now. the problem was whmcs and other site's time zones were different and I made it same and other thing is whmcs url should be "http://xxxx/whmcs/dologin.php" not "http://xxxx/whmcs/clientarea.php" 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.