Our company (
http://www.postatic.com) provides a tool to create online communities.
When a user creates a community, they automatically get a sub-domain.
We do this by wildcard sub-domain.
Then you pick it up in the Apache conf file.
If you are using Laravel, it provides a wildcard subdomain routing feature
http://laravel.com/docs/4.2/routing#sub-domain-routing
It works really really well.
We also allow users to point their custom-domain name to the sub-domain they have been given (http://www.mydomain.com -> http://sub.postatic.com)
All works well.
We use 1and1 for our main domain (postatic.com) and our DNS is handled by Linode.
Let me know if you have any further questions. Will gladly share knowledge! (hello@postatic.com)