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.

Using security tokens in account creation script

Discussion in 'cPanel Developers' started by forx, May 6, 2013.

  1. forx

    forx Registered

    Joined:
    Jun 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello

    I was using the following php script to create accounts


    Code:
    $script = "http://{$whm_user}:{$whm_pass}@{$whm_host}:2086/scripts/wwwacct";
    $params = "?plan={$user_plan}&domain={$user_domain}&username={$user_name}&password={$user_pass}&contactemail=info@mydomain.com";
    $result = file_get_contents($script.$params);
    
    echo $result;

    Now for security tokens I get an access denied error

    Can anyone please post an updated working php script?

    Thank you very much!
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
Loading...

Share This Page