<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP &#8211; How to get domain name from URL?</title>
	<atom:link href="http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/feed/" rel="self" type="application/rss+xml" />
	<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/</link>
	<description>Daily Blog from Internet Entrepreneur/Webmaster</description>
	<lastBuildDate>Tue, 07 Feb 2012 20:25:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Evgen</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-23688</link>
		<dc:creator>Evgen</dc:creator>
		<pubDate>Wed, 01 Feb 2012 10:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-23688</guid>
		<description>function getDomain()
{
    preg_match(&quot;#^.*?([a-z0-9-]+\.[a-z]{0,3})$#i&quot;,   $_SERVER[&#039;HTTP_HOST&#039;], $matches);
    return $matches[1];
}</description>
		<content:encoded><![CDATA[<p>function getDomain()<br />
{<br />
    preg_match(&#8220;#^.*?([a-z0-9-]+\.[a-z]{0,3})$#i&#8221;,   $_SERVER['HTTP_HOST'], $matches);<br />
    return $matches[1];<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peak</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-23175</link>
		<dc:creator>peak</dc:creator>
		<pubDate>Tue, 13 Dec 2011 16:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-23175</guid>
		<description>$w_url[]=weburl.split[&#039;/&#039;];</description>
		<content:encoded><![CDATA[<p>$w_url[]=weburl.split['/'];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tired</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-20322</link>
		<dc:creator>tired</dc:creator>
		<pubDate>Sat, 13 Aug 2011 06:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-20322</guid>
		<description>&gt;Guillaume
&quot;Please sometimes read PHP Manual !&quot;

Or you could try to read the question!

He wants to get rid of the www (or any other subdomain) from the host and show only the domain.</description>
		<content:encoded><![CDATA[<p>&gt;Guillaume<br />
&#8220;Please sometimes read PHP Manual !&#8221;</p>
<p>Or you could try to read the question!</p>
<p>He wants to get rid of the www (or any other subdomain) from the host and show only the domain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-20296</link>
		<dc:creator>Guillaume</dc:creator>
		<pubDate>Tue, 09 Aug 2011 12:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-20296</guid>
		<description>Or you can simply use :
parse_url(&quot;http://www.myurl.com&quot;, PHP_URL_HOST);

Please sometimes read PHP Manual !</description>
		<content:encoded><![CDATA[<p>Or you can simply use :<br />
parse_url(&#8220;http://www.myurl.com&#8221;, PHP_URL_HOST);</p>
<p>Please sometimes read PHP Manual !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r4i</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19715</link>
		<dc:creator>r4i</dc:creator>
		<pubDate>Mon, 20 Jun 2011 08:52:52 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19715</guid>
		<description>This function is exactly what I am looking for</description>
		<content:encoded><![CDATA[<p>This function is exactly what I am looking for</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R4</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19693</link>
		<dc:creator>R4</dc:creator>
		<pubDate>Fri, 17 Jun 2011 07:47:59 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19693</guid>
		<description>Very useful, thanks.</description>
		<content:encoded><![CDATA[<p>Very useful, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R4 R4i</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19242</link>
		<dc:creator>R4 R4i</dc:creator>
		<pubDate>Thu, 05 May 2011 09:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19242</guid>
		<description>Spot on. Great post.</description>
		<content:encoded><![CDATA[<p>Spot on. Great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lam</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19060</link>
		<dc:creator>John Lam</dc:creator>
		<pubDate>Mon, 25 Apr 2011 05:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-19060</guid>
		<description>Very nice post. This function is exactly what I am looking for.
Thanks</description>
		<content:encoded><![CDATA[<p>Very nice post. This function is exactly what I am looking for.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: supernova</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-18764</link>
		<dc:creator>supernova</dc:creator>
		<pubDate>Thu, 24 Mar 2011 20:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-18764</guid>
		<description>if domain name end with www such as www.lawww.com or www.giwww.com, code is not working correctly...</description>
		<content:encoded><![CDATA[<p>if domain name end with www such as <a href="http://www.lawww.com" rel="nofollow">http://www.lawww.com</a> or <a href="http://www.giwww.com" rel="nofollow">http://www.giwww.com</a>, code is not working correctly&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth</title>
		<link>http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-17820</link>
		<dc:creator>Gareth</dc:creator>
		<pubDate>Tue, 01 Feb 2011 19:41:44 +0000</pubDate>
		<guid isPermaLink="false">http://corpocrat.com/2009/02/28/php-how-to-get-domain-hostname-from-url/#comment-17820</guid>
		<description>Could use just do a whois check?</description>
		<content:encoded><![CDATA[<p>Could use just do a whois check?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

