What I want
I want to get from a URL the domain part so from http://example.com/ -> example.com>
URL
domain
http://example.com/
example.com>
if (preg_match('/http:\/\/([^\/]+)\//i', $target_string, $matches)) { $domain = $matches[1]; }