Does anyone know of a source of information on how to automate some of the tasks that can be done from within a cPanel interface but from PHP. I know I have the ability to do this partly due to the idea of a GPG code to do this from PHP, but I am unsure of how to go about this, can someone post a link to point me in the right direction? Thanks in advance, Dan
if it is some simple features/functions like add email or what not... you can do a post through the https with your login info and send all the required variables... alternatively you can go to cpanel's website to read up on their api but i think that it mainly works with whm accounts... like the script autowhm to resell hosting.. good luck.. sorry i dont have any place to point you to... i once used the post method to offer free pop3 accounts and just recorded the info into mysql so that i could automate admin functions like deleting accounts but moderating individual emails is not possible this way. thanks, juls
Well yes, email modifications, primarily adding the accounts is one thing I am desiring to do. But one of the other parts that I would like to do is to either add an add-on domain or a parked domain/subdomain combo, can the domain items be done through the post function. Is Curl best in PHP or is there a different way that is better in PHP? Dan
ya you can do the add-on domain or parked domain / subdomain combo.... you can pretty much use any of the features through post.... and yes curl is the best but not necessary... that is my opinion..
If Curl is best, but not necessary, how would a person go about doing this idea, either using curl or otherwise? I do want to stay in PHP with it though, that way it can be automated from my database and other things can be connected to it. Dan
you can use fsockopen but only if your server doesnt have curl setup and you dont have enough access to set it up yourself.. there is another sketchier way but use either of those two methods... but i prefer curl... actually both are just as simple. good luck
Is there a tutorial or maybe a help page on this topic? I am definately interested. Also would this method let me interface with some of the other features within the cPanel system? I can gather the URLs and such that the tools I am desiring to use are, but one of the main parts that I am not sure about is the login stuff and how I would make sure that would work. Dan
Dan, I will look for a tutorial for you but to my knowledge one doesnt exist. This is something that I just messed and tried after I saw a php cpanel email script for sale. Basically like authorization through .htaccess just provide the usernameassword at the beginning of the url. like https://juls:seomasterintraining@www.digitalpoint.com:2082/cpanelfeature.html hope that helps.. ;-) Thanks, Juls
Yeah, as far as the username/password is concerned that is what I figured it would be, with curl in php, do you know how one would go about preparing a POST packet?
The best method is to use the API supplied for WHM. Look at the example code used by TinyTool to create an account and email the information collected from the system to the client. Urls is http://www.teatoast.com/PmWiki/TinyTool/ViewSourceCode