|
Posted by Andy Jeffries on 03/24/06 12:52
On Fri, 24 Mar 2006 02:37:57 -0800, thehetre wrote:
> For example, visit this site http://deviantart.com and try to register one
> account. I have a account is thehetre. And this site create a sub domain
> for me (include) : http://thehetre.deviantart.com
>
> So, how to doing like this in PHP or another web program language? Please
> show your solution or script you know. Thanks so much!!!
Use "ServerAlias *.deviantart.com" within your virtual host in Apache,
then parse $_SERVER[HTTP_HOST] in a PHP file (you can use autoprepend) to
get the first part.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|