phpsubdomain

create subdomain using php dynamically when the server has cPanel environment


I want to know how to create subdomain using PHP. The server uses cPanel control panel and i have seen code but not clear of what it does. Is there any php function to create subdomains? Or do we have to rely the server settings for this?


Solution

  • if you have cPanel then you can use what i used.

    very simple function provided my hosting company server guy.

    http://vikku.info/programming/php/create-subdomain-dynamically-in-php-code-to-create-subdomains-in-server-using-php.htm

    As the other use said i agree that php cannot do anything with this...

    These functions call cPanel libraries indirectly and those functions can access server level functions because they will have permission to do that.