PDA

View Full Version : sub-domains



Ini
26-03-2007, 04:39 PM
i want to make a blog sort of site and i want to no if anyone knows how to make the user system so when you sign up, it creates a subdomain with there ser name, with there own folder.

Any help?

+rep

Invent
26-03-2007, 05:24 PM
Not sure on subdomain..I know how to make a folder for them though



mkdir();


Haha :P

Ini
26-03-2007, 05:32 PM
So i would just put that in my register code?

In the brackets would i put $user in there as the username form field?

I'll give it a try.

Still need the sub-domin thing.

Invent
26-03-2007, 05:51 PM
Say your username variable is $username just do



mkdir("/home/cpanelusername/public_html/$username", 0777);
I think the function is.

Ini
26-03-2007, 05:58 PM
where in register would i put it?

Heinous
26-03-2007, 09:18 PM
where in register would i put it?
The point where they successfully register?

Ini
30-03-2007, 12:18 PM
Ty.

Any advances on the create sub domain?

Mr.OSH
31-03-2007, 12:22 AM
I'm not too sure I know you can do it as I've seen lots of automatic hosting and billing software that does it.. a cron that runs when sign ups are received or something if you could do that or do it manually? Also try looking at some of the coding in scripts that already have things like that running? Sorry what I just said probably was not much help at all! :P

Ini
31-03-2007, 09:31 AM
I'm not too sure I know you can do it as I've seen lots of automatic hosting and billing software that does it.. a cron that runs when sign ups are received or something if you could do that or do it manually? Also try looking at some of the coding in scripts that already have things like that running? Sorry what I just said probably was not much help at all! :P

Billing programs use WHM to make a hosting account not an ordinary sub-domain on a site. I no how to do i that way but it will waste much more space on my server.

Thanks for your help anyway <3

Want to hide these adverts? Register an account for free!