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.

UAPI PHP Class

Discussion in 'cPanel Developers' started by N1ghteyes, Jul 10, 2014.

  1. N1ghteyes

    N1ghteyes Active Member

    Joined:
    Mar 3, 2014
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi All,

    There is probably something out there for the UAPI already, but needing something simple and pretty quick, i've made a start on this:

    /https://github.com/N1ghteyes/cpanel-UAPI-php-class

    i'll get around to adding examples of usage up over the next couple of days, its simple enough though, very basic use is in the readme.

    Feel free to use it, post issues etc. the more that do use it, the faster it'll get extended / fixed and so on :)

    Also, let me know what you think.
     
    #1 N1ghteyes, Jul 10, 2014
    Last edited: Jul 10, 2014
  2. N1ghteyes

    N1ghteyes Active Member

    Joined:
    Mar 3, 2014
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just a note, i've added an example file for using the MySQL module added in 11.44. More examples to follow, but it should atleast provide an idea :)
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Thank you for taking the time to add these examples. Keep in mind that cPanel does not review/validate third-party code, so it's important for users to test this on their own.
     
  4. N1ghteyes

    N1ghteyes Active Member

    Joined:
    Mar 3, 2014
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi Michael,

    I completely get that :) the comment was more aimed at third party users / developers, incase they come accross any bugs or want something extra from it :), pretty much just posted up here as a hopefully useful resource.

    Of course, anyone from cP is more than welcome to use it as well if its needed :P

    and as always if anyone else wants different examples / finds a bug, let me know in here or on the issue queue on GitHub =)
     
  5. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    That's a great script, thank you !

    What is the best method to capture the returned message (if any) and display it ?

    For example, after I added a POP account, the message could be "You POP account has been added", or "Error, can't not add POP account right now" if the script failed.

    Or simply any message returned by the system.

    Thanks again.
     
    #5 lvt, Feb 17, 2016
    Last edited by a moderator: Feb 17, 2016
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please use github for this sort of thing. These forums should not be used to support unsupported 3rd party projects.

    Thanks!
     
    lvt likes this.
  7. N1ghteyes

    N1ghteyes Active Member

    Joined:
    Mar 3, 2014
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi lvt,

    Could you post an issue on Github? That way more people are likely to see it and I can mark it as a Documentation issue as well.

    Issues · N1ghteyes/cpanel-UAPI-php-class · GitHub

    Thanks!
     
    lvt likes this.
Loading...

Share This Page