The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Verifying if the WHM ACCESS KEY is correct.

Discussion in 'cPanel Developers' started by paulgfx, May 24, 2006.

  1. paulgfx

    paulgfx Registered

    Joined:
    Mar 9, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi.
    I would like to know if the user copied/pasted the correct whm access key.
    I am trying with this function:
    Code:
    function hashOK()
      {
        $result = whmreq("/scripts2/showversion",CPANEL_HOST,CPANEL_USER,$this->getAccessHash(),0);
        if ((strlen($result)>0)&&(strlen($result)<25)) return true;
    	else return false;
      }
    
    I made this, because I found that in case of wrong whm key, it returns a big html data.

    The problem is that this request sometimes returns 0 even if the key is correct or even if it is wrong key.
    Please tell me a sure way how can I verify the WHM key.
    Thanks.
    Paul
     
Loading...

Share This Page