Class :: cPanel Subdomain V2
This is the 2nd edition of my previous Class cPanel Subdomains Creator. Using this script you can create cPanel subdomain & FTP account for this subdomain without logging into cPanel. Let your user create their own subdomains and FTP accounts for that subdomain. Users will get access only to newly created subdomain not to the root directory. So your contents will be secure.
To use this script you must have access to cPanel.
Open exaple.php file and change the red marked values as your environment.
$cpanel=new cpsubdomain("cPanel User","cPanel Pass","Domain","cPanel Theme");
For example:
$cpanel=new cpsubdomain("mysite","12345","mysite.com","x");
Now change the Quota for each FTP account. To do this simply change the red marked value.
echo $cpanel->createFTP($_POST['subdomain'],$_POST['ftppass'],"20");




































































very good
very good
[Reply]
Subdomain created successfully
There may be some error while creating FTP account.
What can be the reason?
[Reply]
please check whether the
please check whether the username for FTP is already used. bcoz it will try to create ftp on the same name of subdomain. also check your ftp accounts quota.
thanks
[Reply]
Hello
The original script
Hello
The original script has a way to add subdomains from file. Is there a way to do this from this script??
thanks
techtac
[Reply]
Very Nice
Thanks
Very Nice
Thanks
[Reply]
Hello,
I just go through
Hello,
I just go through this script but is there any other script to create Domain or Parked Domain without entering in cPanel?
If is there then guide me to reach this functionality.
Thanks & Waiting for your reply,
TEJAS
[Reply]
Dear Tejas,
Not a bad idea.
Dear Tejas,
Not a bad idea. If you want, I may make such script for you. Mail to if you are interested.
Thanks
[Reply]
(Not a bad idea. If you want, I may make such script for you. Mail to if you are interested.
)
I would like a script like this how much are you charging?
[Reply]
admin Reply:
April 16th, 2009 at 10:22 AM
please contact me over mail. (the hungrycoder @ gmail . com). Omit all spaces.
thanks
[Reply]
Does this script check if the subdomain already exists?
[Reply]
Disregard my last comment, I was wondering how to create a subdomain account in WHM instead of cPanel, would you just change the port and user/pass?
[Reply]
@Mir,
Why should we do it when WHM provides api for that? Creating a subdomain (in fact creating a new cpanel account), is easy using WHM’s api.
[Reply]
Yes i was taking a look at it (http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CreateAccount), but im not sure if i can get it to work, but i will try it. Thanks for your help.
[Reply]
I dont think i can get it to work because i dont want to create the subdomain, instead i just check if it exists or not.
I could create the subdomain, and if it is a success, then just delete it, but that would waste a lot of server resources(using a vps)
Do you have any suggestions?
[Reply]