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

Free PHP Scripts :: cPanel Subdomains Creator

Use cPanel Subdomain Creator to create subdomains on cPanel based hosting.

Input:
  • cPanel account username
  • cPanel account password
  • cPanel skin (see Determining your cPanel Theme/Skin for more info on how to determine cPanel skin)
  • list of subdomains to be created in the plain text file (if creating from file)
  • Parent domain (can create subdomains for different domains when creating from file)

Update program header with above settings and script is ready to use.

Usage: (you can use this script in either way)
  • Open script in browser and fill the form data
  • Pass all information via URL (form will not appear in this case)
    Example: cpanel_subdomains.php?cpaneluser=USER&cpanelpass=PASSWORD&domain=DOMAIN&subdomain=SUBDOMAIN
  • List all subdomains to be created in the plain text file

Note: If script cannot find file with subdomains and no parameters passed via URL then it will show input form.

Download cPanel Subdomains Creator


Comments

July 14, 2006
I wish I could find it earlier :( Payed $10 for such script recently.
August 1, 2006
can u please make another version that allow me to write the domain name and the user name in a form and then the account is created ??
zubrag August 2, 2006
Now it can handle three ways: input form, parameters via URL, or subdomains list from file.
August 4, 2006
There's no option for which plan to use?
What does this default to when there are several plans available for one domain?
I wouldn't want subdomains to have the same quotas and features as the main account. eg: unlimited, if I'm setting up member subdomains.

zubrag: It just creates subdomains with same quotas and features as the main account. We are going to develop the cPanel WHM User Accounts Creator soon for those who need automatical user accounts set up (mostly hosting resellers). It will be separate script, since it will require access to cPanel Web Host Manager.
Cookie August 9, 2006
I like this script alot but it would be handy if it created a ftp account as well.
zubrag August 9, 2006
Cookie, we are going to implement adding FTP account. Please check back in few days.
August 14, 2006
When you create Cpanel subdomains through WHM, You must choose the package it will be assigned. Otherwise, the subdomain will have the same privelledges and quotas as the parent account.
This is NOT something you want if you are a reseller or if you are prividing userspace.
In order to protect other users and the main account with suexec, limit shell access, define frontpage extensions on/off, etc, the package should be assigned when creating the subdomain ;)
Otherwise, this script would only be suitable for a single user cpanel account.
August 19, 2006
how i can delete subdomein with this script?
cnielson [anti-spam] cmaiinc.com August 20, 2006
I succeeded on first attempt to create a single sub-domain using form..worked great...

How would I write the browser command to use a list?

This is not clear to me..... I understand I could create a list (in say a txt file--listing the sub-domains..) and then what would be the format of the command ....

Great tool...and thanks for your help..
Charlie Nielson

--

=====
cpanel_subdomains.php?cpaneluser=USER&cpanelpass=PASSWORD&domain=DOMAIN&subdomain=SUBDOMAIN
zubrag August 20, 2006
You cannot delete subdomains with this script. It can only create subdomains.

If you want it to create subdomains from file then:
1. you will need to create file named 'domains.txt' which would contain list of subdomains (one per line).
2. use following command:
cpanel_subdomains.php?cpaneluser=USER&cpanelpass=PASSWORD&domain=DOMAIN
Above DOMAIN is domain for which you want to create subdomains.
santino [anti-spam] uhupi.com September 8, 2006
I find this script great, but the problem I have is that when I create a subdomain it redirects automatic to the folder with the same name, for example, I do www.sub.domain.com i created the subdomain call SUB, and automaticlly create a folder calls SUB and redirect there, how can I do to add also a diferent redirection in the same time the subdomain register.
Thanks
Karl September 17, 2006
Wish is was more secure, so that only select people can run the script.
September 23, 2006
Thanks man! It works perfectly!
Will September 25, 2006
Excellent script, thanks!
lungu_bogdan [anti-spam] yahoo.com September 29, 2006
Good ideea! Worked perfectly. Thanks!
abuhark [anti-spam] gmail.com October 19, 2006
Any give me same for hosting contrller pl
buy cheap domains October 20, 2006
Karl, I did what you want with http://www.zubrag.com/scripts/password-protect.php

You'll get password protected domain creator
Hybrid November 5, 2006
This is looking great!
s.anand1 [anti-spam] gmail.com November 8, 2006
Thanks for this script. It was really awesome of you.

I know only very basic PHP..should I delete any of the "define" lines if I am choosing to take one of the options or can i simply copy the code and work?

I seem to be having some problem here.
raju November 14, 2006
Nice script, I have extended the script once more. Your visitors can signup for their own email accout and you can set quota for each.
Moreover, I converted into a class for greater inconvience.

visit http://www.rajuru.xenexbd.com/
roachd [anti-spam] roachville.com November 16, 2006
You are the man! Great solution. Keep it up.
nakiox [anti-spam] hotmail.com November 18, 2006
Hi! nice Script.. well.. but I need help.. I need to auto create subdomains when a user sign up to my website.. is secure if I send the cpanel user and pasword by hidden variables? .. can some inteligent user get my cpanel user and password ?..
please reply to my email if you can!
Thanks a lot.
sat_verman [anti-spam] rediffmail.com November 28, 2006
Hi! nice Script.. well.. but I need help.. I need to auto create subdomains when a user sign up to my website.. is secure if I send the cpanel user and pasword by hidden variables? .. can some inteligent user get my cpanel user and password ?..
please reply to my email if you can!
Thanks a lot.
mustatin [anti-spam] yahoo.com December 21, 2006
great script man, but can you give us a solution to delete subdomain also?
Johan January 3, 2007
Great script, even for somebody without knowledge of php, it is easy to handle.
Shouldn't it be easy to change a little in the php source code, so that it can automatically delete the subdomains also?
brandonchall [anti-spam] comcast.net January 4, 2007
I need a custom script created. I would like to speak with you about creating it. Of course, I would be willing to pay for your time. Please contact me at the above email address. Thanks.
January 16, 2007
great script! was playing around with rewriterules to try and fake it... just what i was looking for!
wizard_tn [anti-spam] hotmail.com January 17, 2007
I tried running this to enter multiple subdomains from the text file.

1st run: 4 names in file.. quit after 3 creations

2nd run: 44 names in file.. quit after 5 creations.

Does not seem to handle the creation from the .txt file well.

Any suggestions?
Mastermind January 24, 2007
Thanks for the script, this is very useful!
It works perfect...
Jillian January 24, 2007
Thank you so much, I have been tearing my hair out trying to figure out how to do this...
February 13, 2007
hi, when running the script throgh form error comes: Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:2082 in /home/www/a43837f89b961fe6c2f05ce023e384e2/web/cpanel_subdomains.php on line 87
Socket error . Please help
kevindill [anti-spam] yahoo.com February 14, 2007
Hi, does anyone know a script that can remove multiple subdomains? I installed a bunch and they need to be deleted and reinstalled. Thanks for any information.
Bunny February 22, 2007
HTTP/1.0 404 Not Found Server: cpsrvd/10.9.6 Connection: close Content-type: text/html 404 Not Found Not Found The server was not able to find the document (./frontend/x/subdomain/doadddomain.html) you requested Please check the url and try again. You might also want to report this error to your webhost. cpsrvd/10.9.6 Server at localhost


i got above error when i creating subdomain
please help me
February 25, 2007
Set "x2" as cPanel Skin (without ")
hmqasimali201 [anti-spam] yahoo.co.in February 28, 2007
please help sokket error
enjoygame [anti-spam] hotmail.com - http://www.virtualdarpan.com April 28, 2007
thanks its fine in cpanel but i couldn't get success with vdeck. and its nightmare using vdeck for subdomain coz u are told to create unlimited[i mean allowed] but there is no space than 10. it would be great if this script help with vdeck.
Pink May 23, 2007
Can you please explain the process step by step what exactly i have to do after downloading the file , if i want to run and test the creation of sub domain like suman.example.com.
eddie June 2, 2007
Are you interesting to write about redirect system with cpanel subdomain include member system? I agree pay money for it!
my-email is eddie0936031870@gmail.com
xivworker [anti-spam] yahoo.com August 4, 2007
thanks a lot
Qenzoz August 25, 2007
I get Socket error
what shall i enter in Domain: ?
infosgsl [anti-spam] dbzmail.com September 1, 2007
I want a free subdomain hosting to test my website
narenderkota [anti-spam] yahoo.com September 26, 2007
Is this the way of, which the blogger blogspot will create subdomains ?
Sony "mobitrek" AK September 30, 2007
Hi Zubrag, great script, i'm using the script for our subdomain creation at mobitrek.com for our community. Keep the good work!! (Sony AK from Mobitrek Mobile Solutions Indonesia http://m.mobitrek.com)
Glyn October 19, 2007
Instead of creating folder on the root, how about within a subfolder?
for example, testing.domain.com, instead of /public_html/testing, can we have /public_html/folder1/folder2/testing
??

thanks!!
Glyn October 19, 2007
btw, my email is tantaikooi[anti-spam]gmail.com
mattruler [anti-spam] gmail.com November 11, 2007
Hi, is there any way to change the default directory for the subdomain??
acromm [anti-spam] gmail.com November 16, 2007
yes, send the &dir parameter in the URL with,
ex//
public_html/DIR/SUBDIR/ETC...
alongkorn.s [anti-spam] gmail.com December 15, 2007
I 'm very thank you for your scripts, its help me to solve problem about mass domains addon.
Finally that it's success.

http://www.9korn.com/2007/free-script-cpanel-mass-addon-domain/
webmaster [anti-spam] ourwedding.in December 26, 2007
We use your scripts to create subdomain. The hosting services provider has upgraded to ver 11 (cpanel). Your scripts fail now. We were advised to specify the default path when we create the subdomains (these were created in root folder and should have been created in public_html or the www folder).

Let's know how we define the 'path' .

Thanks in advance for your time.
December 28, 2007
This script took down my entire server.
hulkbaba [anti-spam] hulkbaba.com December 29, 2007
Hi, great work but my server gone down too =(
GTXPC December 31, 2007
Code is good, but something needs to be check because after the script it't run makes Server go down something changes in teh httpd file or config, that is not good. has to be a way to fix this. zubrag please check the code. thank you gtxpc
iman.khaghani [anti-spam] gmail.com January 6, 2008
this code cause the server to be down. i tried this code on payamtejarat.net which cause their apache server to be down two times and they suspend my account. my hosting Cpanel is cpanel 11-X3 zubrag it is very necessary to fix the bug or give a solution for it
January 11, 2008
Hi
Server getting down. Actually sth wrong with apache.
Also as soon as subdomain is created, the folder is also being created. But, there is a funny sign at the end of the folder.

Dan January 14, 2008
This crashed 2 different servers. It kills the httpd server process. We tried this on both of our servers with the same results. Strange since about 3 months ago this worked fine on our server and now it crashes it every time? Any fix yet?
January 23, 2008
Brandon

I'm a newbie on this stuff. What is a subdomain?
January 23, 2008
waiting to fix bug then download, otherwise...

www.web2view.com
= zubrag = January 23, 2008
Hello!
Looks like subdomains create process has been changed in cPanel 11. This forum thread has info on how to fix if you are on cPanel 11. Meanwhile i'm trying to automate the process somehow. Please do not post your questions here, post them on the forum. Thank you!

http://www.zubrag.com/forum/index.php/topic,373.msg1479.html#msg1479
Aila January 27, 2008
Sorry for breaking your rule. my internet connection is down at the moment and alot of links that i go to don't work. well, um... i'm kinda knew to adding subs n stuff so yea...

oh, and i filled out the form thing then i pressed create subdomain or something like that, and i got this error.

HTTP/1.0 401 Access Denied Still Working Connection: close Set-Cookie: logintheme=cpanel; path=/ Set-Cookie: cprelogin=no; path=/ Set-Cookie: cpsession=closed; path=/ Server: cpsrvd/11.2.2 Content-type: text/html cPanel® 11 Login Username Password © cPanel, Inc. 2006-2008

please reply when u have the chance. most appreciate it if u can reply on my site.

roar.exofire.net
a!la
developer.suresh [anti-spam] gmail.com April 7, 2008
Hi,

i am try this cpanel sub domain creater script.really good.i got one issue.
i can see all sub domain in cpanel after using this script.

but, sub domain folder not created in FTP.plese help me.

Add Comment

!!! Comments posted here will not be answered. If you want to ask a question please post it on the forum.

E-mail or Name: Not required. Email will be protected from spammers

Comment: Please do not post unrelated comments

Anti-spam: Please enter (ade0a026) into the box