I am looking for a solution to create subdomains programmatically in ASP.NET, ASP.NET MVC and PHP. Specifically, a user profile page should resolve for both: www.domain.co
www.domain.co
You could try:
AppDomain subDomain = AppDomain.CreateDomain("ProfileUserDomain");
Although you may have to configure your DNS to allow request from your code. Dynamic DNS services could be your answer.