Jump to content
xisto Community
Sign in to follow this  
Network1405241550

Subdomains need a script to create some

Recommended Posts

Hi guys, ive been working on a hosting script for clans, and i would just like to ask how to do 2 thingsbecause i havent found anything in PHP which will do it.The things i want are:1. Subdomains, i need the user to be able to choose a subdomain, then the script assigns it and makes it workas of this point i have found nothing to do this (it doesnt have to be PHP)2. Deleting full directrysIn effect removing the account, i cant find something to do this, i can find the one that allows me to delete emtey directrysbut cant find anything that allows me to just wipe a full one when a user deletes his/her account

Share this post


Link to post
Share on other sites

about deleting the directories, you can use some system function, but also if you only have access to php, there are plenty scripts to delete directories and all other directories inside, it is as I know called recursive function call, you read the files of a dir, check if it is a dir and call the same function again and until only files are left, you just delete them, something like that. ;)About sub-domains, I think PHP won't help, you would need to call a system function, or Perl might do the work, never did anything like that..

Share this post


Link to post
Share on other sites

Well, this is kind of advanced server issues...

If you want to add or remove a subdomain from your server, you will need to have a script that can access the configuration settings of the server. This is tricky since most servers are set up so that these settings can't be accessed from an outside source or from the public directories of your system.

Your first obstacle is your hosting provider...
If your hosting account isn't dedicated or near dedicated, then you probably won't have the required server permissions to accomplish what you want to do.

The second consideration is your server software...
If you are using Apache on Linux, then your configuration settings are more than likely all in one file. Being able to select the correct parts of this file and modify it to either add or remove a subdomain is the biggest part of the process. Once that is accomplished, the actual subdomain directory or user account is must than be created for it.

Your third issue will be your server interface...
Whatever script or scripts you use will need to be smart enough to add or remove a subdomain from your server but not damage the rest of the configuration settings.

My suggestion is to do research on Apache and Linux manipulation but since that is a lot of work and you are probably not going to do it, I suggest the following:

Get a reseller account from a major hosting provider like Xisto - Web Hosting. This will provide you with an actual Web Host Manager interface to create, modify, and remove new cPanel accounts (subdomains) from the server. Additionally, this also offers the user the ability to "Sign Up" for a new account. You can specify what the basic template of each new website will be and given some trickery with scripts and Apache, you can even force ads on your subdomains.

Small reseller accounts can be found for as little as $20.00 US a month.

vujsa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.