<?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>Tue, 18 Jun 2013 02:40:16 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[HashBangCode.com: Revisiting filter_var() and FILTER_VALIDATE_URL]]></title>
      <guid>http://www.phpdeveloper.org/news/16139</guid>
      <link>http://www.phpdeveloper.org/news/16139</link>
      <description><![CDATA[<p>
From the HashBangCode.com site today there's a new post that <a href="http://www.hashbangcode.com/blog/revisiting-filtervar-and-filtervalidateurl-548.html">revisits filtering with the filter_var function</a> included with the language. The focus in this article is specifically in validating URLs with the FILTER_VALIDATE_URL flag.
</p>
<blockquote>
<a href="http://www.hashbangcode.com/blog/php-filter-filtervalidateurl-limitations-111.html">Quite a while ago</a> I looked at using the filter_var() function to validate URL's using the FILTER_VALIDATE_URL flag and someone pointed out recently that this function has not only changed since the initial release, but that a number of flags can be added to change the way that this function works.
</blockquote>
<p>
He lists some of the other flags that are now available that can be used in conjunction with FILTER_VALIDATE_URL to get more fine-grained in your filtering - checks on things like a required scheme, hostname and query string. He includes some code with a set of URLs to run through some tests and output as a table with the pass/fail rank of each URL value. You can see the <a href="http://www.hashbangcode.com/examples/filter_var_url_validate/">resulting output here</a>.
</p>]]></description>
      <pubDate>Mon, 04 Apr 2011 08:44:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vanessa Vasile's Blog: Using PHP to Perform DNS Lookups]]></title>
      <guid>http://www.phpdeveloper.org/news/14738</guid>
      <link>http://www.phpdeveloper.org/news/14738</link>
      <description><![CDATA[<p>
In a handy little post to her blog today <i>Vanessa Vasile</i> <a href="http://www.v-nessa.net/2010/06/30/using-php-to-perform-dns-lookups">has an example</a> of how to use built-in PHP functions to perform DNS lookups in your scripts.
</p>
<blockquote>
PHP has a couple DNS functions you can use to perform record lookups. Most of us are familiar with the two basic ones - <a href="http://us4.php.net/gethostbyname">gethostbyname()</a> and <a href="http://us4.php.net/gethostbyname">gethostbyaddr()</a>, both of which perform a single function '" returning a hostname or IP address.
</blockquote>
<p>
She also mentions the <a href="http://us2.php.net/manual/en/function.gethostbynamel.php">gethostbynamel</a> and <a href="http://us2.php.net/manual/en/function.dns-get-record.php">dns_get_record</a> functions that can give you even more insight into the current DNS of a given domain (even returning only record-type specific information).
</p>]]></description>
      <pubDate>Thu, 01 Jul 2010 11:37:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anis uddin Ahmad's Blog: Advanced bootstrapping : Configure your Zend Framework application for mult]]></title>
      <guid>http://www.phpdeveloper.org/news/11941</guid>
      <link>http://www.phpdeveloper.org/news/11941</link>
      <description><![CDATA[<p>
<i>Anis uddin Ahmad</i> has <a href="http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/">a handy bootstrapping example</a> for those that might want to use the Zend Framework for more than just a single site.
</p>
<blockquote>
A web application goes through some stages when growing up. Generally, it starts from development and ends at production. There can be some more stages within this two ends. And, in maximum cases this stages are overlapped. [...] In this situations, if we want to keep bootstrap in <a href="http://en.wikipedia.org/wiki/Subversion_(software)">SVN</a> repo, it needs to setup bootstrap in a little different way. So that, it can handle many server settings with a single bootstrap.
</blockquote>
<p>
He sets up some assumptions (like a familiarity with the Zend Framework), some of the <a href="http://www.ajaxray.com/blog/downloads/bootstrap">files</a> you'll need to download and how to use them to set up your host for the multiple-site bootstrap. The different sites are defined in arrays at the beginning of the file and are compared to the current hostname. The correct include paths are then set and the bootstrap script continues on.
</p>]]></description>
      <pubDate>Thu, 12 Feb 2009 13:40:55 -0600</pubDate>
    </item>
    <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>
