I re-read the thread, you intend to put a small cms within the directory. That is pretty cool. What cms? Database to flat text file?
The forms work could easily be done. I do not, yet, know a way for a directory/subdomain to create on the fly.
Perhaps you could clone directories with the script pre-installed and name them 1, 2, 3, 4, which refer to the user id. With user-cms content included at the user's main profile and the user-cms admin section included at the user's edit profile.
You could attempt re-write URL's to display the username. example:
.../modules/users/user.php?cms=2
to
.../modules/users/cms_2/
or better
.../modules/users/'username'/
(username = userid 2)
If it is a module, as displayed in the url above, an 'actual' directory on the server is not needed. It would also offer search capabilities, a user-cms directory, featured blocks, and host admin. I seen a module perform automation similar to what you desire. It is the XooperMod XOOPS Module Generator
http://www.worldware.com/modules/xoopermod/This takes your form input, creates files and directories, zips it up, submits to another module for file download, and then the download auto-expires. WOW!
I thought of doing this before for scripts where #'s represent people. There is a module on my website which is, in fact, a mini user-cms called Members Homepages. This is in it's most simplest form and is very confusing to use. This module is the possible beginning of a new generation of modules because it presents itself as a mini-xoops for the users, it is clean coded, and it's functions are unique to other modules. I have collected much feedback, bufixes, and worked on much of the navigation to make it more user friendly.
If anybody reading this feels these ideas are impossible or would be very hard to implement, then please speak up.Thanks Everybody!
ps. The Members Homepages module could be scrapped in this plan, for I have other similar module ideas that would work as a personal page, although, completely different from Members Homepages.