N1ghteyes

Active Member
Mar 3, 2014
33
2
58
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.
 
Last edited:

N1ghteyes

Active Member
Mar 3, 2014
33
2
58
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 :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
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.
 

N1ghteyes

Active Member
Mar 3, 2014
33
2
58
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 =)
 

lvt

Well-Known Member
May 23, 2009
49
0
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.
 
Last edited by a moderator:

N1ghteyes

Active Member
Mar 3, 2014
33
2
58
Reading, UK
cPanel Access Level
Root Administrator
Twitter
  • Like
Reactions: lvt