Jump to content

Archived

This topic is now archived and is closed to further replies.

Teonnyn

Creating subdomains via PHP?

Recommended Posts

Okay.. here's the problem ensofar. We've set up a system so that when a user signs up, they are given a folder within the site. It isn't an actual subdomain, and it links to a file such as [a href=\"http://teonnyn.dataresort.com/?mod=memberpage&function=showUserPage\" target=\"_blank\"]http://teonnyn.dataresort.com/?mod=memberp...on=showUserPage[/a]. From here, you have to press a button to visit the actual site.. which isn't at username.dataresort.com at all, instead, it's a redirection to the upload folder. This could be an annoyance to various users who just want to look at their site through a short link. Can this be avoided by having a HTML uploader-accessable subdomain created instead of a folder within the upload folder? What would be the best way to handle it?

Share this post


Link to post
Share on other sites
I honestly don't know if this is possible, I wanted to respond because no one had gotten around to answering you but as far as I know, no there isn't a way to do this, but I could be wrong.

Share this post


Link to post
Share on other sites
[!--quoteo(post=367403:date=Apr 22 2006, 03:14 AM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ Apr 22 2006, 03:14 AM) [snapback]367403[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I honestly don't know if this is possible, I wanted to respond because no one had gotten around to answering you but as far as I know, no there isn't a way to do this, but I could be wrong.
[/quote]
Well, it's almost certainly possible. PHP has a command called system() which will run a program on the originating OS, so if your webserver is Linux, it lets you run a linux shell command. So, you need to find out how to create subdomains on your server.

Rob

Share this post


Link to post
Share on other sites
If you use WHM to create accounts or use CPanel as a reseller..

Find out the address that CPanel / WHM uses as a form action

I know for a FACT that CPanel uses a ton of $_GET's for the information

Share this post


Link to post
Share on other sites

×

Important Information

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.