Witam
Posiadam przykładowo taki link:
http://www.strona.pl/dom/remonty/firma-remontowa.html
W jaki sposób można z tego linka wyciągnąć jedynie adres URL (http://www.strona.pl) ?
$pattern = '#^(http://.*?)/#si'; $url = 'http://www.strona.pl/dom/remonty/firma-remontowa.html';
$url = 'http://www.strona.pl/dom/remonty/firma-remontowa.html';