[eluser]PromaneX[/eluser]
I needed to be able to create e-mail accounts on my cpanel server from within my application so I created a class to do that. I am sharing it here in case anyone else needs this functionality too.
I may extend this to include other cpanel functions such as forwarders, auto-replies, sub-domains and such, if anyone needs something, let me know and i will add it for you.
cpanel.php - place in system/application/libraries/
UPDATE
Quote:I was asked to add support for getting and setting Cron - That feature has now been added.
for get_cron you can call the function with no arguments to return all lines of the cron or you can pass a string and the function will search inside the commands for that string and only return lines that contain it. for set_cron you can pass min,hour,day,month,dayofweek,command and it will add a new line, if you also pass an ID it will update that line of the cron and not add a new one.
Please let me know about any bugs you find or any improvments you come up with
Updated code is in a later post, i reached the max length in this one!!, just replace existing cpanel.php with the new one.