<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 29 Aug 2008 19:31:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[John Rockefeller's Blog: PHP Tricks: How To Handle Multiple Domains]]></title>
      <guid>http://www.phpdeveloper.org/news/10278</guid>
      <link>http://www.phpdeveloper.org/news/10278</link>
      <description><![CDATA[<p>
<i>John Rockefeller</i> has <a href="http://www.johnrockefeller.net/?p=194">a tip</a> he'd like to share with all of the other PHP developers out there - a little method he's come up with to host multiple domains off of the same code.
</p>
<blockquote>
This is really handy for those of us who have the same code handling multiple sites or multiple sub-domains. A case in point: When I coded NetBoardz (my free forum hosting service now defunct), I had one codebase handling all 250 forums. How? Simple. When the code runs, it determines which site the user is loading and does different things (like using different databases) dynamically.
</blockquote>
<p>
He shows the two <a href="http://www.johnrockefeller.net/?p=194">key points</a> to dividing things up - grabbing the domain and subdomain they were trying to access. This can be fed into a script that can switch things like layout or even functionality based on which site they've chosen.
</p>]]></description>
      <pubDate>Tue, 27 May 2008 11:11:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stoyan Stefanov's Blog: www vs no-www and cookies]]></title>
      <guid>http://www.phpdeveloper.org/news/10182</guid>
      <link>http://www.phpdeveloper.org/news/10182</link>
      <description><![CDATA[<p>
<i>Stoyan Stefanov</i> has come up against one of the frustrations of web development involving cookies - problems caused by the switch from a "www." in the host to none. He's <a href="http://www.phpied.com/www-vs-no-www-and-cookies/">come up with a test</a> to show you how cookies are set and where you can access them from.
</p>
<blockquote>
One of the implications of following the rule is related to the whole <a href="http://www.sitepoint.com/blogs/2008/02/19/www-or-no-www/">www vs no-www</a> question. Basically you should always use www if you're planning to use any other sub-domains and you want them cookie-free. This is because you have no way to set a cookie only to the top-level domain.
</blockquote>
<p>
His code sets cookies for the ".phpied.com", "phpied.com" and "www.phpied.com" domains. Since the domains without the "www" offer a bit broader range of possible matches, he recommends that if you're ever going to use any kind of subdomain, you'll want to use the more broad cookie to cover it.
</p>]]></description>
      <pubDate>Wed, 14 May 2008 11:18:39 -0500</pubDate>
    </item>
  </channel>
</rss>
