Added method for subdomain retrieval

Though this is a bit wank as no subdomain will pull the url. But meh. Subdomains are a faff. Seeing as they can be hello.world.domain.com and so on. There's a very long winded ugly way I have done it before but this is short.