The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › Subdomain for PHP
How do you create subdomains using PHP?
[Drupal Web Design](http://www.drupalgeeks.org/drupal-web-design “Drupal Web Design”) | [Drupal Web Development](http://www.drupalgeeks.org/drupal-development “Drupal Web Development”)
It is Not possible to create subdomain in PHP?
That’s pretty impossible , take a look at what i found at stackoverflow :-
1) if you have cPanel then you can use what i used.
very simple function provided my hosting company server guy.
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.
2)PHP has nothing to do with domain or subdomains. You have to configure your server application accordingly to achieve this.
If you are using apache, take a look in their documentation about vhosts.