General Community > Scripting Help
Capture subdomain
Aquilo:
I was editing while you posted I updated the last post!
CokeCan:
That one isn't working for me :(
The first one works ok :-\
Aquilo:
sorry for got a 1!
--- Code: ---<?php
$startcheck = $HTTP_SERVER_VARS["HTTP_HOST"];
$startcheck = ereg_replace ('http://', '', $startcheck);
$MyName1 = explode('/', $startcheck);
$MyName2 = explode('.', $MyName1[0]);
$MyName = $MyName2[0];
?>
--- End code ---
CokeCan:
THANKS!
CokeCan:
This is for another website bt is it posible to get just the domain name with any subdomain? :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version