Hi everyone, i really don't know if this is the right place, so please just move this to the right category..
now here's my problem:
I want to create a website for my high school batch graduated last 2004 so we can interact to our old friends. but i want it to be like ning.com, myspace.com or friendster.com that you can add your own layout (css) for your profile and putting the new user in it's own profile page (using a subdomain for their own profile page)
can anyone tell me how to automatically create the subdomain and putting the CSS and other files in the subdomain automatically? thanks in advance..
There is a way you could do it. you could write a script that uses the Exec command to create a directory and then have the script generator the profile template files in that directory. you would probably need to include an .HTACCESS file just in case allowing all access to that directory. something like this
<?PHP$uid = $_GET['username]; exec(escapeshellcmd("mkdir $uid"), $out);include('profile_maker.php'); <---- script to generator to profile template etc.?>
it would take more a lot more then this, this is just an example of how it could be done. you would then have to have the profile_maker generate the profile template files to the directory $out would be easier to use profiles.php?uid=30403040304 <--- userid number
How To Create Subdomain Using Php? creating subdomain automatically after signing up
in Websites and Web Designing
Posted · Report reply
There is a way you could do it. you could write a script that uses the Exec command to create a directory and then have the script generator the profile template files in that directory. you would probably need to include an .HTACCESS file just in case allowing all access to that directory. something like this
it would take more a lot more then this, this is just an example of how it could be done.
you would then have to have the profile_maker generate the profile template files to the directory $out
would be easier to use profiles.php?uid=30403040304 <--- userid number