Create a user account with PHP (script)?


Active Member
Dec 12, 2010
I have written a script which creates a heap of files and copies files and does a whole heap of other stuff, depending on the information provided with a forum. The end result is a little flat file CMS.

That's all well and good, but now that I pretty much have what amounts to an installation script for my CMS, it would be MUCH better of I could actually add some code to create the subdomain (or domain) for the script.

For two days I have searched high and low for information on how to create a cPanel account, with a form, through PHP. I have also tried about four methods spending hours each time. But each and every time, I wind up with the same problem!

I eagerly add the code to my script, I run it and... same thing: A cPanel log-in form pops up. It's as if cPanel doesn't want an outside script installing stuff. I think there must be some key or some method to allow it. I've seen many references to that in my searches, but no actual explanations.

So, I want to know, is there any comprehensive information which explains exactly how to create a new cPanel account (subdomain or domain) with PHP?

If I can just figure out this last thing, I will have a bonafide automatically installable CMS that I can quite easily create a little website provider service (of sorts).

The only thing preventing me from doing that is the excruciating pain I've gone through to try to get PHP to set up a cPanel account.

Of course, I do not blame cPanel. I love cPanel! Of course I know there's a way, and for someone who knows what they're doing, it's probably EASY. But for me, it hasn't been easy. All the articles I've found were lacking in detail. I tried my best to use the information, but if you to a Google search, you'll find that almost all of the results are from 2005, 2006, 2007, etc. They're probably so old they don't even work anymore.

Can someone please help me? I created the CMS, and it's flat file. I am not a "programmer" per se -- just someone willing to roll their sleeves up.

The script is really great, and to be able to get the installation process (which is 100% working) create the actual "account" before installing the script would allow me to 100% automate creation and installation of my little CMS :)