I'm currently creating a custom application which involves letting each users have its own subdomain but I'm finding it hard to make that work.
I want user to do this on the fly during registration.
How do I make this work using PHP, .htaccess
and MySQL?
This is what I've done so far.
<?php
$host = $_SERVER ['HTTP_HOST'] ;
$subdomain = "myshop" ;
$domain = "$subdomain.$host" ;
echo $domain ;
?>