Ok i made a thread before about sending the subdomain to php and decided to go
with wildcard subdomain: *.domain.co.nz (used cPanel and works good)
Now i want to get the sub domain out with php...
I tryed using parse_url() but i doesnt work and i also tryed user made code and that didnt that well...
Examples:
http://www.sub.mysite.co.nz
http://sub.mysite.co.nz
These will return "sub" or false if the url is normal like this:
http://www.mysite.co.nz
http://mysite.co.nz
Also what do i use to even get the url... i used $_SERVER['SERVER_NAME']
Any ideas?
Thanks!
Lex