Разбиваем URL адрес
<? $string = 'https://optomoll.ru/upload/iblock/1bc/1bc29158d218f9438109c769ccfd9455.jpg'; $domain = parse_url($string);