Current location: Hot Scripts Forums » General Community » Script Requests » Subdomain...


Subdomain...

Reply
  #1 (permalink)  
Old 03-16-05, 09:49 AM
SeeK SeeK is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Subdomain...

Anyone know where i can find a free subdomain script? So users can make a theirname.mydomain.com.....

-SeeK
__________________
www.Seek-Design.com
Reply With Quote
  #2 (permalink)  
Old 03-19-05, 05:48 PM
SeeK SeeK is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone know of one?
__________________
www.Seek-Design.com
Reply With Quote
  #3 (permalink)  
Old 03-19-05, 07:41 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
From php.net:

-----------------------------

If you got a server which got only one subdomain and you
can't add a subdomain you can easily create your own "subdomain
script". You may create a file "index.php" or what ever your
default filename is in the webpage root directory and add the
following PHP Code:

<?php

// Get possible subdomain

$full_url = sprintf($HTTP_HOST);
$subdomain = "";

for($i = 0;$i<=strlen($full_url);$i++)
{

$dummy = substr($full_url,$i,1);

if($dummy == ".")
{
break;
}

$subdomain = $subdomain.$dummy;

}

// Get Subdomain List

if ($subdomain <> "www")
{

switch($subdomain)
{
case "download":
$real_url = "http://www.mydomain.com/download/index.php";
break;
case "contact":
$real_url = "http://www.mydomain.com/contact.php";
break;

}

header( "location: $real_url\r\n" );

?>
-----------------------------

This might also work:

http://www.mycgiscripts.com/free-hoster.html



Finally, from phpbuilders.com:

-----------------------------
Assuming you are using BIND. You need to edit the zone file using php. This
means giving php write access to the file.

If you can do this then.........

open the file for writing using fopen
add the domain record to the end

write the file to disk.

http://uk2.php.net/manual/en/function.fopen.php

restart BIND (or make a cron job to restart it every 10 minutes perhaps)

Done
-----------------------------
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #4 (permalink)  
Old 03-20-05, 10:22 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
http://www.mylounge.net has a pretty popular subdomain redirection script.

There's another, but i forget the name of it.
__________________
Yep, it's a signature...
Reply With Quote
  #5 (permalink)  
Old 03-23-05, 04:37 PM
SeeK SeeK is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bizzar528
http://www.mylounge.net has a pretty popular subdomain redirection script.

There's another, but i forget the name of it.
404 - Doesn't work
__________________
www.Seek-Design.com
Reply With Quote
  #6 (permalink)  
Old 03-25-05, 02:33 PM
Anastas Anastas is offline
Wannabe Coder
 
Join Date: Mar 2005
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Some of thsoe scripts may work to create subdomains, but how will your users upload files into their subdomains, edit files, etc.? You need some kind of file manager, but I don't think you want to give them cPanel access. How about this - http;//www.promethian.info/democc - it's a user-accessible filemanager. Would that be useful to you?
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
Free phpBB hosting - NO Ads / 100+ Themes / Unlimited BW / Custom Mods / Subdomain ezForum General Advertisements 0 01-29-05 03:06 AM
automatic subdomain csmaster2005 PHP 4 07-25-04 03:11 PM
subdomain adfreenet Job Offers & Assistance 0 06-21-04 06:39 AM
how do i make a subdomain? mivec PHP 2 03-21-04 01:12 PM
subdomain to another server. forcer The Lounge 3 07-30-03 01:45 PM


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