<?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>Thu, 23 May 2013 07:11:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Protect files within public folders with mod_rewrite and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15504</guid>
      <link>http://www.phpdeveloper.org/news/15504</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has <a href="http://gonzalo123.wordpress.com/2010/11/29/protect-files-within-public-folders-with-mod_rewrite-and-php/">a new post</a> that can help you protect certain files inside of a public folder by combining mod_rewrite and PHP.
</p>
<blockquote>
Here's the problem. We have a legacy application (or a WordPress blog for the example) and we want to protect the access to the application according to our corporate single sign on. We can create a plug-in in WordPress to ensure only our single sign-on's session cookie is activated.
</blockquote>
<p>
In his example, he shows the handling of an uploaded file and a plugin that can be used to protect parts of the site based on session information. Unfortunately, by itself, this doesn't prevent the direct access of the file. His trick is to route all file access back through a central "media.php" script that fetches it from a file location (could even be outside the docroot). The routing to the PHP is handled via mod_rewrite and the code checks the permissions on the current user's session for access.
</p>]]></description>
      <pubDate>Mon, 29 Nov 2010 09:45:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Scanning Folders with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11403</guid>
      <link>http://www.phpdeveloper.org/news/11403</link>
      <description><![CDATA[<p>
The NETTUTS.com site has posted <a href="http://nettuts.com/videos/screencasts/scanning-folders-with-php/">a new PHP-related screencast</a> that covers a simple script to scan over the contents of folders in PHP. To illustrate, they create an image gallery script that mirrors the filesystem structure.
</p>
<blockquote>
Let's imagine that you want to build a page that will display snapshots of your latest work. [...] In such instances, the best solution is to make PHP scan your "portfolio" folder and dynamically create the code for you. If you want to update your page with a new snapshot, all that you need to do is drag the image, and its respective thumbnail, into the appropriate folders - and PHP will do the rest. Let's build it now! 
</blockquote>
<p>
The screencast comes complete with <a href="http://nettuts.s3.amazonaws.com/120_screencast/scanFolders.zip">the entire source</a> and a <a href="http://nettuts.com/demos/018_screencast/featured.php">link to a demo</a> to show the end result.
</p>]]></description>
      <pubDate>Thu, 13 Nov 2008 14:18:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ed Finkler's Blog: Zend Studio for Eclipse and SFTPDrive not on speaking terms]]></title>
      <guid>http://www.phpdeveloper.org/news/9826</guid>
      <link>http://www.phpdeveloper.org/news/9826</link>
      <description><![CDATA[<p>
<i>Ed Finkler</i>, a long-time user of <a href="http://www.sftpdrive.com/">SFTPDrive</a> on his Windows machine, has noticed something a bit odd lately when using the new Zend Studio (Eclipse):
</p>
<blockquote>
For some reason, ZSfE just doesn't show me my 'k:' drive (the SFTP mount) when browsing for a project directory. This throws a real wrench in my usual workflow '" ZS 5.5 had built-in SFTP support, and I could also use the local mount if I wanted.
</blockquote>
<p>
Finding nothing in the traditional places, he's <a href="http://funkatron.com/site/comments/zend-studio-for-eclipse-and-sftpdrive-not-on-speaking-terms/#When:14:40:00Z">made this blog post</a> hoping someone might have the answer. Turns out that the fix (as provided by <i>Josh Johnston</i>) is to create a new project around a new Remote Folder.
</p>]]></description>
      <pubDate>Thu, 20 Mar 2008 07:58:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Development Blog: Tutorial: Create a zip file from folders on the fly]]></title>
      <guid>http://www.phpdeveloper.org/news/8748</guid>
      <link>http://www.phpdeveloper.org/news/8748</link>
      <description><![CDATA[<p>
On the Web Development Blog, there's <a href="http://www.web-development-blog.com/archives/tutorial-create-a-zip-file-from-folders-on-the-fly/">a quick tutorial</a> on creating dynamic zip files via a helpful little class:
</p>
<blockquote>
For a future project I needed these days some easy to use zip or gzip class to create a zip file from files / folders inside a specified directory. [...] I tested two [other] scripts before and must say that this script works great for single files if you add them manually. To compress a whole directory with an unknown number of files into one zip file I created some class extension to get this job done.
</blockquote>
<p>
In <a href="http://www.web-development-blog.com/archives/tutorial-create-a-zip-file-from-folders-on-the-fly/">his class</a>, the get_file_from_folder method is called with the directory and the file to load them into. This loops through the files, pulling them all (directories and all) into the new zip file. An example of the class' use is also included. 
</p>]]></description>
      <pubDate>Fri, 28 Sep 2007 10:24:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: How to use Zend Framework Controller/Action approach?]]></title>
      <guid>http://www.phpdeveloper.org/news/7244</guid>
      <link>http://www.phpdeveloper.org/news/7244</link>
      <description><![CDATA[<p>
Continuing on from an <a href="http://www.phpdeveloper.org/news/7225">earlier discussion</a> about the Zend Framework and form submission and handling, <i>Alexander Netkachev</i> has <a href="http://www.alexatnet.com/Blog/Index/2007-02-08/how-to-use-zend-framework-controller-action-approach">come back</a> to talk a bit more about the Controller/Action approach.
</p>
<blockquote>
I have a few discussions here about the <a href="http://www.alexatnet.com/Blog/Index/2007-02-06/controller-action-versus-folder-page">question</a> I opened a couple of days ago:  how the standard form processing is related to the Controller/Action idea and how developers that are creating sites with the standard Folder/Page approach can use Zend Framework's Controller/Action approach.
</blockquote>
<p>
What <a href="http://www.alexatnet.com/Blog/Index/2007-02-08/how-to-use-zend-framework-controller-action-approach">came out</a> of the discussions were three points - use the Controller/Action model to your advantage, use your own forms but use RewriteRouter to make them work, or use the Folder/Page mentality instead.
</p>]]></description>
      <pubDate>Thu, 08 Feb 2007 09:57:00 -0600</pubDate>
    </item>
  </channel>
</rss>
