Jump to content

Creating subdomains via PHP?


Teonnyn

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?
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.