General Community > Scripting Help

Capture subdomain

<< < (2/3) > >>

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 (&#39;http://&#39;, &#39;&#39;, $startcheck);
$MyName1 = explode(&#39;/&#39;, $startcheck);
$MyName2 = explode(&#39;.&#39;, $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