Hello friends,
i want a situation whereby when members confirm his registration a subdomain will be automatically created. eg if a member by name Mike Lawrence confirm his registration, a subdomain like www.mydomain.com/mikelawnrece OR mikelawrence.mydomain.com will be created, so that anyone can visit his profile by entering the subdomain in any address bar. pls what are the easiest ways of doing this.
how do i create subdomain automatically
Moderator: General Moderators
Re: how do i create subdomain automatically
Your best bet would be to set up a *.yourdomain.com subdomain, and have it forward to your regular www.yourdomain.com website. In your index.php file, check what the subdomain is & show the appropriate stuff based on that.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: how do i create subdomain automatically
Pls do you have any tutorial for that, i need one to put me through. thanks
Re: how do i create subdomain automatically
I think CPanel is the easiest way to set up a subdomain. If you don't have access to that, talk to your hosting provider & tell them what you want to do.
As far as examining the url in PHP, look into the $_SERVER superglobal.
As far as examining the url in PHP, look into the $_SERVER superglobal.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.