Jump to content


Photo

Creating subdomains via PHP?


  • Please log in to reply
3 replies to this topic

#1 Teonnyn

Teonnyn
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 April 2006 - 11:21 PM

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?

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 22 April 2006 - 02:14 AM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 Roberto

Roberto
  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationLondon, England

Posted 22 April 2006 - 06:09 PM

[!--quoteo(post=367403:date=Apr 22 2006, 03:14 AM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ Apr 22 2006, 03:14 AM) View Post[/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
*************************************
Mad Mouse Media Web Design
t: (+34) 610 837 558
e: rob@madmousemedia.co.uk
w: www.madmousemedia.co.uk
w: www.madmouseart.com *************************************

#4 High_-_Tek

High_-_Tek
  • Members
  • PipPipPip
  • Advanced Member
  • 72 posts

Posted 22 April 2006 - 06:15 PM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users