Basically, what I would like to know how can I extract a word from url. A basic example would be like in http://dpFolks.youaremighty.com. I want to know how it extracts the part dpFolks. Any ideas?
preg_match('/http:\/\/([^\.]+)/', $url, $subdomain); echo $subdomain[1]; PHP: Untested, but should work.