Current location: Hot Scripts Forums » Programming Languages » PHP » Automate Subdomains


Automate Subdomains

Reply
  #1 (permalink)  
Old 10-20-04, 12:49 PM
cebuy cebuy is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Automate Subdomains

I have cpanel and it allows me to create subdomains in the admin center. When I do, it automatically generates a directory by the same name of the subdomain which includes a cgi-bin directory. My question is this... is there a way to make a php script that will do the same thing BUT create an index page & a variables page with the variables page having the name of the subdomain in it?

For instance...
I create http://california.quotingloans.com and it has a variables page that writes this..
<?php
$keyword = 'california';
?>

or if I did this subdomain...
I create http://loans.quotingloans.com and it has a variables page that writes this..
<?php
$keyword = 'loans';
?>
IN each directory created, an index.htm file is generated. I would also create a htaccess file too to make the .htm file run like an .php file with addtype.

Is there any way to do this in php? Any ideas out there? I want to do this so that I could make creating sub domains easier.

Chris Chandler
Webmaster of QUOTING LOANS
Reply With Quote
  #2 (permalink)  
Old 10-20-04, 07:58 PM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
why not? you can do that with your php. you can create a form to pass the subdomain name and let php exec with sudo enabled do the rest..
good luck!!
__________________
just an ignorant noob with moronic solution...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opinion seeking about domains vs subdomains in SE ranking greggy General Advertisements 0 10-15-04 05:32 PM
Automate download delivery, create your own affiliate program with Pixie & Paypal listenmirndt General Advertisements 1 03-15-04 06:16 PM
Creating subdomains Infinite_Hackers Script Requests 6 12-30-03 03:46 AM
cms portal for different subdomains fantasia PHP 7 07-25-03 05:37 PM
CMS for use across subdomains gillbates PHP 4 07-15-03 10:35 PM


All times are GMT -5. The time now is 04:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.