1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

postwwwact script

Discussion in 'cPanel Developers' started by madpato, Dec 8, 2011.

  1. madpato

    madpato Member

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    I am following this guide for the creation of a db (and its user) for cpanel accounts:

    Frequently Asked Scripts: "How do I automate XYZ after creating an account?" - cPanel Integration

    I am not a programmer im just trying to do this to make my life at work easier when it comes to create a new account, I havent tested it yet because i want to sort out the fact that it uses the same password for the db and the cpanel account, so ive inserted a little password generator script inside that file (the bold part), this is what i have:

    What i want to know is if this line:

    If i put the variable $password (of the mentioned function) instead of ['pass'] it should work?

    Any help and advice is appreciated. Thank you
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    You would want to replace $xmlapi->cliargs['pass'] not just ['pass'] - the stuff between the brackets is a command line interfae (CLI) parameter. Since $password is a variable rather than a command line parameter, you would replace the entirety of that "variable."

    To recap, a CLI parameter is something like this:

    myscript.php user=bob pass=~sup3rsecur3!!

    Everything after the .php is a parameter. In this case, the parameters are named user and pass respectively.
     
  3. madpato

    madpato Member

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Im so sorry for my late reply. I will give it a try thank you.
     

Share This Page