free hosting script with automated subdomain etc.

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
pprograms
Forum Newbie
Posts: 1
Joined: Sun Aug 24, 2003 5:10 pm

free hosting script with automated subdomain etc.

Post by pprograms »

hello,

i'm currently having the problem that i want to offer users free space with a subdomain and ftp-access on my server. but i don't want to add each account by hand. is there a way i can automate adding subdomains, ftp-accounts and folders on my apache via php or some other language? please help me out.

best regards,
PPrograms
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

This is a very dangerous idea, but I cant help shooting some ideas.

Creating folders is no problem in PHP.
Subdomains, here it comes, could work if you let PHP write to the file containing the subdomain-info (httpd.conf ?). But as I stated, this is extremely theoretical, and probably not a very good way to do it.

(Another problem is that you might need to restart the server/rehash the server configuration after each addition, and I'm not sure that can be done like this.)
Post Reply