Welcome Guest, Not a member yet? Register   Sign In
getting subdomain url

i am working on application that uses user pages.
forexample if my site is example.com
i have set cname record *.example.com -> example.com
now, suppose if john opens, johnMcCain.example.com, i need to get value johnMcCain from url.

can some one help, please, its urgent

in plain ole php...

$host = $_SERVER['HTTP_HOST'];

From there you parse the url.

Theme © iAndrew 2016 - Forum software by © MyBB