Page 1 of 1

new here! User Registers -> Gets their Own Subdomain?

Posted: Mon Feb 04, 2008 9:53 am
by keith204
OK I am not sure where to look for something like this, and not even sure if this is the right forum for this, but here it goes!

I would to build a website, that when a user registers, they get their own homepage with a shareable link.

I am new to PHP but have played in the sandbox a little bit, and am familiar enough to get everything else done I need to.

So, the overall project is:

User Registers - gets a homepage with a link containing their username (theJonesFamily.testsite.com or testsite.com/thejonesfamily)
That homepage has buttons like "add feature 1" and fills out a form that adds some info. Then, a link to that info appears on their homepage. That info is editable by the user who submitted it.

The above is basically all the requirements of this project, but the part I am having trouble figuring out is how to assign each new user a certain link that they can share with their friends. Any idea of any existing projects that might give me a start on this? This is something for my family/friends to use mainly, so I would like for it to be easy (as easy as installing phpbb) but of course having to mod it. It might get big, so on the flipside...it needs to be relatively secure.

Re: new here! User Registers -> Gets their Own Subdomain?

Posted: Mon Feb 04, 2008 12:55 pm
by Christopher
There are many ways to do this.

- For sub-domains you could have PHP exec() a script that created the DNS entry.

- For paths you could again use PHP to create a sub-directory based on some template files,
- or use mod_rewrite to send URLs through a central index.php script that check the path against a list of registered names.

Re: new here! User Registers -> Gets their Own Subdomain?

Posted: Mon Feb 04, 2008 6:36 pm
by Weirdan
another variant is called "wildcard DNS".