Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create subdomain using php dynamically when the server has cPanel environment

Tags:

php

subdomain

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?

like image 348
Jach Many Avatar asked Jul 01 '26 22:07

Jach Many


1 Answers

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.

like image 146
Jayapal Chandran Avatar answered Jul 03 '26 13:07

Jayapal Chandran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!