Witam i pomoc pytam.
Mam adres:
http://www.domena.pl/kategoria/wiadomosc,1,3245x.html
Jak z pomocą PHP wydobyć z niego:
domena.pl
?
<?php function getHost($Address) { return trim($parseUrl['host'] ? $parseUrl['host'] : array_shift(explode('/', $parseUrl['path'], 2))); } getHost("example.com"); // Gives example.com getHost("http://example.com"); // Gives example.com getHost("www.example.com"); // Gives www.example.com getHost("http://example.com/xyz"); // Gives example.com ?>