Class :: cPanel Subdomain V2



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");

Download

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Related Posts:

This entry was posted in Open Source, Scripts, cPanel and tagged , . Bookmark the permalink.

14 Responses to Class :: cPanel Subdomain V2

  1. Moderator says:

    very good

    very good

    [Reply]

  2. Usman Malik says:

    :) Hello nice script, but I
    :) Hello nice script, but I got into this error:

    Subdomain created successfully
    There may be some error while creating FTP account.

    What can be the reason?

    [Reply]

  3. HungryCoder says:

    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]

  4. Techtac says:

    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]

  5. Purvi says:

    Very Nice
    Thanks

    Very Nice

    Thanks

    [Reply]

  6. Tejas says:

    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]

  7. HungryCoder says:

    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]

  8. maxim says:

    (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:

    please contact me over mail. (the hungrycoder @ gmail . com). Omit all spaces.

    thanks

    [Reply]

  9. Mir says:

    Does this script check if the subdomain already exists?

    [Reply]

  10. Mir says:

    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]

  11. admin says:

    @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]

  12. Mir says:

    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]

  13. Mir says:

    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]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">