I have a source code and want allow user to create their webs with it.

I want to use user's registration information about subdomain, admin account and then automatically copy source code folder, create and import database and configure the code for the user, it's the same as a basecamp or teambox or other web builder...

Please tell me how doing it or have the PHP script to do it? Sorry that my English not good

Hello vukhacbiet,
You are asking something very generic without going in details on what you are trying to do ( “the same as a basecamp or teambox” you refer to , doesn’t mean a lot to me for example) . It is like you are asking an easy way or a way that can be described in few sentences of how to arrive at the end of a big journey when you are at the beginning.

If you don’t like to take that journey search the internet if there is a system (PHP scripts I guess) out there that do the job for you. There are many scripts directories and some of them have free scripts as well. Of course then you will be a user of that premade system – scripts , but that is the cost of not taking each step at a time.

If you want to take each step at a time we are here to help you at each one of them. For example I would strongly advise you to learn more about wildcard subdomains and how you can use the same source code. The fist part of the subdomain could be the username from which you can have the id from your db and using that user_id in other tables to get what ever different content you need. Of course this is just an example since I haven’t understood completely what you are trying to achieve and what your data structure is.

I sincerely apologize for my english not good. I have completed a source as a cms. I want to create a script where users can register, and then, get registration information to create a folder, and auto create config file and import the sql file, which makes everything on my hosting

I like wordpress.com .

Ok lets try tearing the problem down and solve it step by step. You said that you have created an CMS , does that mean that YOU have create the tables and the source code in PHP ?

You said that you want to create a script that a user can register , have you created your data structure of users and if so what is exactly your problem of creating a registration and login ?

You said that each user can see another content depending on a subdomain. Have you a link between the users table and your CMS tables ? For example have you the user_id in the contents (or whatever you use) table ?

You said that you want all that to be done with subdomains , have you read and experiment with wildcard subdomains ?

You also said that you like wordpress , is this relevant at any point ?

I am willing to help you if I can but please take the time to answer those questions with answers and not generic comments.

Member Avatar for diafol

I like wordpress.com .

heh heh

As I read this I am reminded of Four Drupal projects that have done something similar.
In the case of http://getpantheon and http://webenabled.com and http://drupalgardens.com and http://acquia.com
In each of these cases, they have Drupal as their CMS and users can log in and create subdomains which are provisioned and set up with specific images. Further, the top level Drupal site serves as a "Dashboard" allowing for much control over many server elements and many Drupal speciifc elements. In the case of GetPantheon and Acquia, they provision THREE subdomains which represent a 3stage development process with GIT version control. In those situations, the top level Drupal site also allows users to move code, files, or databses between stages. Also backups are managed via the dashboard.

The four examples I just gave are for provisioning entire websites which the user could use to do anything. In your case you appear to have a bascamp-like app and you need to allow users to create a subdmain where they can have a copy of the app and customize it to their needs. That's pretty similar to the 4 use-case that I shared.

Now... how to do it?

Well... I can tell you that there is A LOT of activity going on behind the scenes of these 4 Drupal sites. And a lot of the action is not Drupal or even PHP. Anything like Shell Scripts, Python Scripts, Java Scripts, node.js Scripts, etc. All could be used to to handle provisioning the sites, setting up vhost records for subdomains, setting up git, setting up monitoring etc.

Conclusion... You have a LONG ROAD ahead of you. You will need to understand more than Wordpress and more than PHP.
But it CAN be done! ;-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.