Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #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 :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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 =)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. lvt

    lvt Well-Known Member

    Joined:
    May 23, 2009
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    56
    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:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    lvt likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice