zubrag.com
Free php and cpanel scripts to automate your daily routine

Free PHP Scripts :: cPanel/WHM Account Creator for Reseller

WHM Account Creator will automatically create user account in cPanel/WHM, create subdomain in WHM (or assign domain to the user account), and pre-configure hosting package automatically (ftp, email, quota, etc).

Requirements:
  • cPanel WHM

Features:
  • Quick and easy setup: just download it, unzip, open in your favorite plain text editor (like Notepad for Windows, or vi for Unix, etc.), update script with your WHM account login data (YOUR WHM LOGIN DATA block), and save it somewhere on your server.
  • No need to login to your WHM each time you need to create new user account. You will provide only new user account settings.
  • Script can be executed either from browser, or run from your existing PHP script.
  • All options for new account can be tuned by passing parameters to the script.
  • You can password protect it from cPanel, or using simple password protection script.

Accepts parameters:
  • domain - domain or subdomain to be assigned to new account. Sample domain: reseller.com, Sample sub-domain: newuser.reseller.com
  • user - new account username
  • password - password for new account
  • package - hosting package (plan) for the user. Package needs to be setup already using WHM. Quota is controlled in package

Sample usage (3 possible options):
  • Enter script's url in the browser, fill the form data, and press Create Account button
  • Create account by passing all parameters via url.
    http://domain.com/auto/create-whm-account.php?domain=reseller.com&user=hosting&password=manager&package=unix2
  • If you want to execute it from existing php script then add following code
    $user_domain = "userdomain"; // new account domain
    $user_name = "username"; // new account username
    $user_pass = "password"; // new account password
    $user_plan = "hosting_plan"; // new account hosting package (plan)
    include ("create-whm-account.php"); // this will create domain / subdomain

Note: It will not create subdomains if you do not have cPanel/WHM account. If you would like to create subdomain on non-WHM cPanel account then use cPanel Subdomain Creator instead.

Download cPanel/WHM Account Creator for Reseller


Comments

November 8, 2006
wow, I've been looking for this :D thanx
November 15, 2006
Can't help but say thanks for this (mostly because your comments are so easy to submit to too!)! Saved me a ton of time :)
lng-web [anti-spam] oi.com.br November 19, 2006
First sorry for my english :), I don't know what to say :), I don't know how to thank the one who created it, I was looking for this a long time with no sucess, thank you so much.
November 20, 2006
cool script

if you like you can add this to my script database at http://www.brightweb.us

thanks
me [anti-spam] borghunter.com November 22, 2006
WOW!! This is awesome! I have been looking for something like this for quite some time! Thank you so much!
Jitesh Ghushe December 1, 2006
Hey Its a very good control panel addon

Please submit it at http://scripts-directory.net
madhan.kmmr [anti-spam] gmail.com December 7, 2006
WOW!!
Good creation!..
This is awesome!
I like this ... keep updating..!
December 12, 2006
Is there a site with this script that is live so I can see what it's like?
tjjack [anti-spam] hotmail.com December 18, 2006
Does anyone know what needs to be added to this script to enter a contact email address. When this script creates the rest of the cpanel account.
Dave January 2, 2007
This is incredible. I'm a newbie who knows nothing about servers and this thing took me 2 min to get working properly! Thank you!
January 6, 2007
wow wow wow wow wow wow wow wow wow wow wow wow wowwowwow wow wow wow wow wow wow wow thanks a lot !
January 8, 2007
Sweet, this looks great! One thing though, would I be able to put userdomain.mydomain.com for subdomains?
info [anti-spam] uauweb.com January 18, 2007
Thank you fro this great script. I installed it in my website but I am not being able to create a new account. I got this message: "RESULT: You do not have access to create that package (e)!"

Do you need to change the permission to 'Accounting.php.inc'? I've got only READ permission to this file.
hmqasimali201 [anti-spam] yahoo.co.in February 7, 2007
cpanel insert website free
Toplancer February 12, 2007
Its a very nice script... Is there any Demo available for it??
pavan February 17, 2007
zubran sir,

I have a Cpanel and Whm account with some hosting company. i want to create subdomains, and assign cpanel for every subdomain.

i asked this question on different forum but it is of no use.

can u pls tell me is it possible....
if yes how to create it.

THANKS FOR YOUR GREAT EFFORT.

and this script is very nice
Kumar February 21, 2007
Thank you it is good script, but i have dount, what is domain is it our domian or cpanel domain like www.example.com or www.example.com:2086 i am getting confusion please give me example on it
Malik February 22, 2007
very nice, im gonna try it and let you know if it works for me. thanx a million 4 making this great script free to us. God bless
jaime.robledo [anti-spam] techgip.net March 7, 2007
I have a Cpanel and Whm account with some hosting company.When i load the script i get /usr/local/cpanel/Cpanel/Accounting.php.inc does not exist. Please update program with correct path to your WHM interface file. what should i do, I have the file set to full 777.
Kidd March 30, 2007
I also got the 'does not exist error'. I think it may be due to the /usr/local/cpanel/Cpanel path not being set as one of the paths in the php_include setting. Ask your sysadmin.


Kidd March 31, 2007
Or if error try having sysadmin remove the open_basedir php restriction.
sales [anti-spam] hostingShip.com April 6, 2007
SEE HOW THIS SCRIPT WORKS!

Checkout HostingShip.com for it in action!

Great script, thanks alot!!!!!
hercio [anti-spam] gmail.com April 9, 2007
Not function because usr/local/cpanel/Cpanel/Accounting.php.inc does not exist. Please update program with correct path to your WHM interface file. But
[/]# locate Accounting.php.inc
/usr/local/cpanel/Cpanel/Accounting.php.inc
???
eddy.dragan [anti-spam] gmail.com April 17, 2007
anyone knows what's the email variable and where to place it? how do i add the contact email address to the account creation?
krishnacvs [anti-spam] shivam-infonet.com May 15, 2007
The code is really sounds good, but need a bit clarity in the user name , how to use, it
May 23, 2007
I really love this...
Thanks for sharing this great script!
rapidweb June 4, 2007
hey this is the best ever!!! thanks....
June 6, 2007
Works great. Many thanks.
Nuno (Portugal)
June 12, 2007
Work superbly and such a simple and elegant script. Thanks very much
fdhfhfgynyg July 9, 2007
Script looks great come addit to http://www.php-link.com
cvbxcvbxcbvxcbv August 7, 2007
cool
geodll.com August 21, 2007
thnks but i don't know if it will work
Matt September 12, 2007
Great Thing Keep Posting N It Works Verry Well This By The Way Is Not The Moderator Talking
September 23, 2007
Thanks ever so much, just what I was looking for!
September 27, 2007
Aswesome script! I've been needing it for a long time, but couldn't find it anywhere! If you want, you can add this script to my script database,
www.e-scriptmarket.com. Thanks again!
jonell October 8, 2007
mil gracias es muy bueno
October 17, 2007
you're the rock!!!!
generalsun [anti-spam] gmail.com October 20, 2007

Create a new Account

Account Creation Status: failed (Sorry unable to proceed. Too little information *user? *domain? *pass?.)Sorry unable to proceed. Too little information *user? *domain? *pass?.
I already entered in all those information, it still doesn't work?
physxx December 24, 2007
heya,

why r u people so happy about it?
can u guys tell me what this is?
i live in holland, and i can read english, but this stuff.. i don't know what it is :P
can you make an account for world of warcraft with this, cuz that's what i'm looking for, a wow account creater.
so i can play wow for free.
i know there r some private servers, where u can play wow for free, but that's very boring.. the real wow is much more fun!

greetings, physxx.
Aaron January 5, 2008
I have the same problem general sun is having. Could it be a newer version of WHM or a more secure version or something? Because they have that verification code for a reason I think.
January 5, 2008
I Get The Following Error:

---------------------
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/clearhos/public_html/create-whm-account.php on line 82

Warning: file_get_contents(http://...@www.clearhostia.com:2086/scripts/wwwacct?plan=unix_500&domain=reseller.com&username=hosting&password=manager&contactemail=) [function.file-get-contents]: failed to open stream: Permission denied in /home/clearhos/public_html/create-whm-account.php on line 82
RESULT:
-----------------------


Can Someone Help Cause I Really Need This
jaketjay5 [anti-spam] aol February 20, 2008
what does this actually do
StarD March 4, 2008
this is a script for WHM (Web Hosting Manager) and is NOT (note key word is NOT) a World of Warcraft account generator.

This is legal, what you're asking is ILLEGAL.

And yeah thanks this looks great!
mischievousboy_90 [anti-spam] yahoo.com March 8, 2008
Thank for this script. And i want suspend, unsuspend delete account :)
March 21, 2008
Works 100% thanks
SPARTAN April 8, 2008
how does it work? it doesn't seem to do anythin.
admin [anti-spam] tech-knowledgey.com April 24, 2008
Super nice script. Easiest thing out there. I know I have been looking and trying out free automated scripts for WHM. Anyone can use it if they can read directions. Thanx for your time and support of free scripts.
May 2, 2008
lg
Works great, they should have included this in the cpanel reseller package.
Pclover May 8, 2008
Does not work for me :(
m4ffy May 28, 2008
good script but i found a cool cpanel lookalike script at http://www.servxx.info
nikatlas June 6, 2008
what i must download i cannot understand how it works.
August 9, 2008
nice job. works great. very useful
kennith September 18, 2008
this is an awesome scripts. thanks alot !!

onewebspace.com
david September 18, 2008
thank you for the script. it will be great if you can incorporate removal of clients as well.

localservers.us
September 26, 2008
anyone know how to fix the error?
November 5, 2008
wut error you dumbass newbi
joseph_dy_2000 [anti-spam] yahoo.com November 8, 2008
Hi, I tried to use the second option where we create an account by passing all the parameters via url, but I get a 404 error.. any idea why this happened?

Thanks.
ragi2u [anti-spam] gmail.com November 24, 2008
TRIMAKASIH BANYAK PAK CIK
webcomel.com
yehosting December 17, 2008
I am looking for a scripts to help me build a free hosting site! Maybe this scripts can help me.
web-fox December 31, 2008
Wow! I can't wait to use this in my php script!!!
inetsolution2007 [anti-spam] gmail.com February 7, 2009
2daybiz Freelance script(http://www.2daybiz.com/) facilitates this with the service buyers being able to post their buying requirements and the service providers being able to place their best bids in order to get the job.
faisal117a [anti-spam] yahoo.com February 12, 2009
Hi, Its just owsome...greate job buddy...i really need also the reseller account creator within a VPS...can plz find it out??
February 21, 2009
I'm really grateful. You should put this script in google code too, you don't know how easy is to setup the accounts for my free web hosting. Thank you!
kingz737 [anti-spam] hotmail.com February 23, 2009
Any clue how to make it work?
I can not execute this code(any how to?):


script then add following code
$user_domain = "userdomain"; // new account domain
$user_name = "username"; // new account username
$user_pass = "password"; // new account password
$user_plan = "hosting_plan"; // new account hosting package (plan)
include ("create-whm-account.php"); // this will create domain / subdomain
tiptapdoy [anti-spam] live.com March 5, 2009
Zubrag, very interesting code, however i couldn't get it work correctly. I'm submitting the error, and i replaced some info with ** for privacy. I think that the error relates to the domain, because the domain in which i'm executing the script is not the same as the main whm domain (however i can access the whm within the the non-main-domain in which the script is executed).

Maybe you could tell me what am i doing wrong? The vars are being passed correctly with post from another form.

Thank you, twice!



Warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name in

/home/domhost/public_html/registrar/register.php on line 108

Warning: file_get_contents(http://...@www.*******.com.ar:2086/scripts/wwwacct?

plan=*******&domain=*******&username=********&password=*********&contactemail=***********) [function.file-get-contents]: failed to open stream: operation failed in

/home/domhost/public_html/registrar/register.php on line 108
RESULT:
Andrew March 12, 2009
THANK YOU SO MUCH!! YOU MAKE THE BEST PHP SCRIPTS!
regiemon March 27, 2009
is this safe or hackable? i don't want my account to be hack
angeljs [anti-spam] gmail.com April 25, 2009
Thank you so much...this is just what I need. :-)
engsamady [anti-spam] yahoo.com May 17, 2009
I'm getting this error:
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/itvzone/public_html/create-whm-account.php on line 82

Warning: file_get_contents(http://...@it-zoneonline.com:2086/scripts/wwwacct?plan=itvzon_ITZ_starter&domain=dffgd.com&username=ggh&password=fdfgdgdhfddhg&contactemail=engsamady@yahoo.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/itvzone/public_html/create-whm-account.php on line 82
RESULT:
ali June 11, 2009
hi
Tom Harrop July 21, 2009
really good, can't thank you enough
Leighton August 5, 2009
Great Script, Love It!
Kamal September 3, 2009
Error!!
Warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name in

/home/domhost/public_html/registrar/register.php on line 108

Warning: file_get_contents(http://...@www.*******.com.ar:2086/scripts/wwwacct?

plan=*******&domain=*******&username=********&password=*********&contactemail=***********) [function.file-get-contents]: failed to open stream: operation failed in

/home/domhost/public_html/registrar/register.php on line 108
Federico February 12, 2010
Hi, how can i make it working with hostgator?
Thanks
robin_ex [anti-spam] hotmail.com February 20, 2010
thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks
Cosmo March 16, 2010
Hi thanks for the script!

i have a reseller account! and have this Warning: file_get_contents error too!

The script sometimes works, sometimes not! a when i go to log i get another a Brute force locked error.

My Cpanel info is:

cPanel 11.25.0-S43473 - WHM 11.25.0 - X 3.9
CENTOS 5.4 i686 virtuozzo on sv1021
March 28, 2010
$user_domain = "userdomain"; // new account domain
$user_name = "username"; // new account username
$user_pass = "password"; // new account password
$user_plan = "hosting_plan"; // new account hosting package (plan)


Looking at those paraameters, is there any way of creating a program that would scrape the required fields and pass the entries directly to this script, for example I have a whole load of domains say 1000, i want all the passwords to be the same, them all to have the same packages, and them all to have pre-assigned account usernames, also passed from .xls spreadsheet, would this be possible. Even though your script is great, for those of us with many hundreds of names, it could get even easier with a way of passing theese variables and actioning them from a sppreadsheet?, cheers in advance, Dave
April 27, 2010
This is incredible. I'm a newbie who knows nothing about servers and this thing took me 2 min to get working properly! Thank you!
April 29, 2010
http://whm-cpanel.eu.pn/
Thank you it is good script, but i have dount, what is domain is it our domian or cpanel domain like www.ex
anaibandbart [anti-spam] gmail.com May 19, 2010
woowww..sangat bagus nich...kebetulan saya adalah newbee makasih yach
terry.smith [anti-spam] 9.cn May 26, 2010
my link has been hack
rakmit15 [anti-spam] yahoo.com June 16, 2010
some body can know i found this error as below

Warning: file_get_contents(http://...@xxx.com:2086/scripts/wwwacct?plan=xxx_xxxxxx&domain=subdomain.xxx.com&username=xxx&password=xxx&contactemail=) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied in /home/xxxx/public_html/create-whm-account.php on line 82
RESULT:
Dude July 5, 2010
I got the same error (line 82) like Rakmit.
Deepak Rajpal July 13, 2010
thanks a lot... from visionshine.com
rashcms [anti-spam] gmail.com August 4, 2010
Hi,
This script is wrong...you need a remote key from cpanel...
if any one needs this script,contact me:
rashcms [At] gmail com
bilal September 16, 2010
thanks very much
Jan September 19, 2010
thanks!
rusumihaicristian [anti-spam] gmail.com September 20, 2010
How can i delete this lines? :

"Main >> Account Functions >> Create a
Notification => d2hemails@gmail.com via EMAIL [level => 3] "

thx for script !
azaleo [anti-spam] gmail.com October 4, 2010
hello,

i have tried recently your WHM/CPANEL creator, its good, i love the script.

I have something in mind, I want to develop an upgraded script using this.

where do i find a PHP scripts;
1. to list CPANEL accounts
2. to delete CPANEL accounts
3. to modify capacity of CPANEL
4. to modify CPANEL password
5. to terminate CPANEL account
and more...

i know everything is built in WHM but i need to develop some script.

i hope somebody here can give me some information.

thank you.
azaleo [anti-spam] gmail.com October 4, 2010
hello,

I have two reseller servers.

on my other server the script is working fine. SSL is enabled.

I was wondering it is not working on the other server even if SSL is enabled.
the error is "SSL encryption is required for access to this server."

i notice the WHM version they different.

for the server that work.
the version is WHM 11.26.8 and for the other that doesn't work is WHM 11.26.16
Waseem Akhtar Tanoli October 21, 2010
Finally it is working for me, remote key is needed. you can find it in your WHM account under Remote Access function. if any one need my working php file download it from here.

http://www.vbizsol.com/download/whm.zip

Thanks,

Waseem Akthar Tanoli
Vertex Solutions Pvt Ltd.
http://www.vbizsol.com
October 22, 2010
hello Waseem Akhtar Tanoli,

I tried to download your script but it is not existing anymore.

Thanks
Leo
mromrell November 24, 2010
I sure wish someone responded to these comments. I get the same error every time:

Account Creation Status: failed
Sorry, that's an invalid domain

Any help?
Fernadno January 10, 2011
I was getting 82 error. Fixed it. Make sure the username and password that you put in the PHP file are correct.

Dont change the host line as PHP will get the right host details from the server, which also means you need to run it on the server or hosting that your reseller acount is on.

The domain has to include .com or .net etc.

To be safe, keep user name to 8 characters.

And that is about all the issues I ran in to.
godesign [anti-spam] ymail.com January 16, 2011
thanx alot
expertwebhost [anti-spam] gmail.com January 16, 2011
hi mromrell,
try using a different domain and don't use www at the beginning.
maruata.88 [anti-spam] gmail.com January 29, 2011
If I were having lots of money, I should donate them for you, but now I am new babie for programming, so I am sorry for being not able to donate. Thanks a lot.
mail.zubrag [anti-spam] spamavert.com February 21, 2011
A good way to get your server hacked.
February 23, 2011
can ant one create this tutorial on you tube
jothirajan March 7, 2011
Hi i am getting the same Access Denied in /home/********/public_html/create-whm-account.php on line 82

Any one help me on this. I have put the correct username and password for my WHM

Whether i need to activate anything in the server, please help
March 17, 2011
Excellent, a couple of things I needed to change in the WHM url:

1) The http:// to https:// - SSL Encryption was required to access the server.

2) The port my server listens on was not 2086 so I needed to change the :2086 part of the url.
wongwengchen [anti-spam] gmail.com April 22, 2011
can this script send account setup info to my customer?
Nicko_blaster July 22, 2011
You can also Create Miltiple resellers and accoumts with DNS wildcard script : http://trustship.net/?script=dns-wildcard-whm
info [anti-spam] geniushost.info August 12, 2011
One Month free cpanel unlimited hosting contact info@geniushost.info
December 4, 2011
Awesome script.

Check out our web design gurgaon packages : http://shreeashtavinayak.com
info [anti-spam] devanhcrow.com December 13, 2011
I wrote a desktop application that is based on this script (fixed the SSL error in it). You simply import the list of domains, generates a username (that doesn't exist on your server already), generates a password between 16-18 characters. If you are doing it for a client, you can have it send the client an email with their hosting log in details in a very professionally written email template (that you can edit if you want). Also if you are a keepass user like myself, it spits out the XML file needed to easily import into keepass saving you the time of manually creating those entries.

Also since Im the author of this application, I can edit it for you with whatever feature you need (including SMS notifications if you want).

You can reach me at info@devanhcrow.com Also if your looking for a re-seller account and someone to work with personally Im available for that as well.
mrlen76 [anti-spam] gmail.com January 27, 2012
This script no longer works with cPanel 11.30.5
wehostitfree.com [anti-spam] gmail.com May 4, 2012
Need How to install this in my cPanel I've a little knowledge of cPanel.
September 7, 2012
Warning: file_get_contents(http://...@naseem@support.viasgroup.com:2086/scripts/wwwacct?plan=viasgrou_D0&domain=reseller.com&username=hosting&password=manager&contactemail=) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied in
subhcrt September 7, 2012
thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you
naychelin1500 [anti-spam] gmail.com October 14, 2012
help you me?a new account create
naychelin1500 [anti-spam] gmail.com October 14, 2012
help you me?a new account create
support [anti-spam] lasthostingplan.com November 25, 2012
We have taken this script since last year and matured the script part of it quite a bit.

You can see a live working version of this script at lasthostingplan.com, which is a free offering from Domainestimator.com

If you want the public version we have of this script you can request it by contacting us at support@lasthostingplan.com or devanhcrow@aceenterprises.com
Miike January 15, 2013
This is brilliant. Although I have now adapted this to show status screens that would normally only be visible when logged into WHM. Absolutely brilliant head-start thank you
muhammadathar37 [anti-spam] gmail.com November 2, 2013
Oh It did not work on server>It gives massage error on 82.Please help me and send me full help
February 20, 2014
if there anyway to generate dkim and supply an spf record at the same time?
February 21, 2014
The script works well for me..! Ha
February 21, 2014
Need hosting you will get a chance to use the script http://bhpservers.us
rianx17 [anti-spam] gmail.com June 4, 2014
thank, fb.com/ryaan.fathur
agile.mohanr [anti-spam] gmail.com September 25, 2014
not working please help

HTTP request failed! HTTP/1.1 401 Access Denied in xxx/xxx/createwhmaccount.php on line 82
:P October 1, 2014
:P :P :P
+6285312170122 October 3, 2014
Whm
piyushnightboy [anti-spam] gmail.com January 9, 2015
NOT WORKING sir please check
March 9, 2015
Not working for me either running latest version of cPanel and WHM
loqka March 24, 2015
plizzzzzz
galaxyhostinglive [anti-spam] yahoo.co.id April 21, 2015
Thanks :)
sinman13 [anti-spam] gmail.com June 10, 2015
The script work very well with minor modifications. Not all providers give the same configuration for whm server. To work you must modify the variable $whm_host at line 40 with the actual server adress that in many cases is different(ex. use this $whm_host = "cpanel5.domainname.net"; instead of $whm_host = $_SERVER['HTTP_HOST'];). In my case the adress of whm was redirected to another domain. Then if the vhm service use https you must change the line 80. You must replace http with https and also yu must specify the port(the code line to modify $script = "http://{$whm_user}:{$whm_pass}@{$whm_host}:2086/scripts/wwwacct";). In my case the port was 2087.

Srry for my bad english :)))

Many Thx to the creator of the script.

i448539 [anti-spam] gmail.com January 15, 2016
yes, it work.
fart [anti-spam] stain.com May 21, 2016
eggy fart blast, very stinky
September 19, 2016
Awesome, this was so simple. I can't believe how easy and effective this script is. Thank you.
dntbccl [anti-spam] gmail.com April 23, 2017
Thanx a lot.

I want to place a certain DB with values and certain files & folder in the root of all new created cpanels by default.

Is any way please....
'or''=' May 25, 2018
kontol
April 8, 2019
I install the scrip as required and change the fields as in comment June 10, 2015 and and my whm would not create the account, any suggestions please help.