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.

cpanel API

Discussion in 'General Discussion' started by puneet, Jan 5, 2004.

  1. puneet

    puneet Member

    Joined:
    Dec 18, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bombay, India
    hI !

    i wanted to know if CPANEL had some kind of an API ..
    so tht i can write my own scripts to create email ids and etc.

    thanks

    greetings,
    Puneet.
     
  2. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    Try searching the board, everything is here for those who take the time to find it>

    Cpanel API ZIP
     
    #2 Planet_Master, Jan 7, 2004
    Last edited: Jan 7, 2004
  3. puneet

    puneet Member

    Joined:
    Dec 18, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bombay, India
    cpanel API: More

    Hi planet_master !

    thanks for replying !
    I just spent quite sometime trying to find cpanel API related info. I did find the same file tht u've attached ! ..
    however I've no clue how to use those API calls ?

    there was one post mentioning about how to use those calls. It gave this link as an example: http://www.gwsa.net/skinny/index.html

    however this link no longer exists ! ..

    and after spending a lot of time I still wasn't able to fig
    out how to use tht information! ... where do i put the <cpanel ...> tag ? .. (they do not work in the PHP files on my host)

    also .. I do not have root access to the system. U think it'll be possible for me to still use the API ?..

    actually I've a hosting account with a cpanel supporting host .. and I want visitors to my site to be able to create POP3 email accounts for themselves. That's y i want my PHP script to be able to access the cpanel settings and create the email accounts. Obviosly I cannot give direct CPanel access to my visitors ... nor do I want to have the process indirect ie. my visitors send a message to me and then i create it for them. ! ...

    u think ne kinda automation is possible ? ..

    my research is still on ... meanwhile I thought i'd write this msg on the side .. 'coz till now after a lotta trying i till haven't been able to fig. it out !

    thanks !

    greetings,
    puneet.

    PS: if u can show me some link containing this info it'll be great !
     
  4. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    The API is basically used for Cpanel themes as well as WHM and to actually use these and make modifications you would need root access. They are universal cpanel commands for calling applications and information.

    For instance <cpanel print="$user"> would show the username in ones control panel.

    <cpanel Email="countpops()"> would give the number of POP accounts a user has and so on.

    If you just look at the API commands you can tell what each is used for, not to terribly difficult.
     
  5. puneet

    puneet Member

    Joined:
    Dec 18, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bombay, India
    re:

    Hi planet_master !

    thanks again for replying !

    so .. wht do u think can be the solution to my problem ?
    I do not have root access to the system .. but I want to write PHP scripts which can tell CPanel to creat email accounts.

    I'll prolly have to write an HTTP client in PHP ! .. but tht's really a big deal .. and not an easy solution ?

    u think there can be any other way out ?

    greetings,
    Puneet.
     
  6. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    My experience shows that these commands do not work externally from the actual servers files system so you would need root access. Now is there another way of working with the API externally? I wouldnt really know if it is possible to be honest. I wish I could help you further.
     
Loading...

Share This Page