Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Subdomains, need a script to create some
Network
post Oct 24 2007, 12:08 PM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 23
Joined: 23-October 07
From: Yorkshire, England
Member No.: 25,674



Hi guys, ive been working on a hosting script for clans, and i would just like to ask how to do 2 things
because 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 work
as of this point i have found nothing to do this (it doesnt have to be PHP)

2. Deleting full directrys

In effect removing the account, i cant find something to do this, i can find the one that allows me to delete emtey directrys
but cant find anything that allows me to just wipe a full one when a user deletes his/her account
Go to the top of the page
 
+Quote Post
Quatrux
post Oct 24 2007, 08:11 PM
Post #2


the Q
Group Icon

Group: [HOSTED]
Posts: 1,124
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059
myCENTs:4.06



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. tongue.gif

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..
Go to the top of the page
 
+Quote Post
vujsa
post Oct 24 2007, 11:44 PM
Post #3


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714
myCENTs:35.43



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 ComputingHost. 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Firefox Trobleshooting!(6)


 



- Lo-Fi Version Time is now: 2nd December 2008 - 02:15 PM