Hi,
I am attempting to authenticate into a cPanel account with its owners (Reseller Access Hash) key.
I have so far got it working so that the api can authenticate with the reseller's password into any of their accounts as per the setting in root WHM. However I'd prefer to use the access hash if possible.
Is it possible to authenticate into cPanel accounts using its owners hash key?
So far I've got,
However when it trys authenticate with the access hash I get
Any help appreciated.
I am attempting to authenticate into a cPanel account with its owners (Reseller Access Hash) key.
I have so far got it working so that the api can authenticate with the reseller's password into any of their accounts as per the setting in root WHM. However I'd prefer to use the access hash if possible.
Is it possible to authenticate into cPanel accounts using its owners hash key?
So far I've got,
PHP:
$authstr = $array['cpuser'] . ":" . $array['cppass'];
$pass = base64_encode($authstr);
if(empty($array['cppass'])){
fputs($socket, "Authorization: WHM " . $array['cpuser'] . ":" . preg_replace("'(\r|\n)'","",$array['cphash']) . "\r\n");
}else{
fputs($socket, "Authorization:Basic " . $pass . "\r\n");
}
Code:
HTTP/1.1 403 Forbidden Access denied
Connection: close
Server: cpsrvd/11.32.3.21
Content-type: text/plain
Access denied