Sub Domains

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Sub Domains

Post by Gen-ik »

I know I've seen this somewhere else on this Forum but I've spent an hour looking for the topic but can't find the bugger.

I'm trying to find out if it's possible to LIST and CREATE sub-domains on my server through PHP. I can create the sub domains through my site admin pages but I want to be able to do it from any website on my server.

Any 'helpful' help would be fantastic :)

Cheers.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

I would image so. Create a bot to do so, if you want some bot creation help see the following links.

Manual's Filesystem section
Manual's Session section
A somewhat related post on this forum
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Thanks but I'm not sure if those links are going to help.. although I will inch my way through the file system pages just to make sure.

I can't see how Sessions are going to help me do what I want to do.

And the other topic wasn't really 'related' at all but thanks for the pointers anyway.


To make things clear let's say my domain is mysite.com and it allows sub-domains such as music.mysite.com, or art.mysite.com.
What I'm trying to find out is if it's possible or not to list the current sub-domains... and also create sub-domains on my site using PHP.

Obviously the sub-domains point to a folder on the 'parent' site so art.mysite.com might point towards mysite.com/public/art/
Post Reply