<?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>Sun, 12 Feb 2012 21:50:15 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Tracking Upload Progress with PHP and JavaScript]]></title>
      <guid>http://www.phpdeveloper.org/news/17503</guid>
      <link>http://www.phpdeveloper.org/news/17503</link>
      <description><![CDATA[<p>
In a new tutorial today from PHPMaster.com, they show you how to <a href="http://phpmaster.com/tracking-upload-progress-with-php-and-javascript/">combine Javascript and a PHP feature</a> to track the progress of an upload to your web application.
</p>
<blockquote>
A problem that has plagued web developers for years is how to add real-time information to their applications, such as a progress bar for file uploads. [...] JavaScript can access a file's name, type, and even the width and height of a local image, but it wasn't until <a href="http://stackoverflow.com/q/4112575/322819">HTML5 that it could access a file's size</a>. [...] In this article I'll show you how [the session.upload_progress] feature can be used to create a simple upload progress bar without any external libraries or browser dependencies.
</blockquote>
<p>
The tutorial provides all the steps you'll need to get it working - defining the form with the extra required field, styling it and plugging the Javascript in to call a small script to get the progress of the upload. It returns the difference between the content-length of the file and the current size (as a percentage of 100).
</p>]]></description>
      <pubDate>Mon, 06 Feb 2012 13:58:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: File Uploads with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16907</guid>
      <link>http://www.phpdeveloper.org/news/16907</link>
      <description><![CDATA[<p>
SitePoint's PHPMaster.com site has a new tutorial today from <i>Timothy Boronczky</i> about <a href="http://phpmaster.com/file-uploads-with-php/">handling file uploads</a> in PHP. It's a pretty low-level introduction and is perfect for those new to PHP.
</p>
<blockquote>
What do pictures in an online photo album, email attachments in a web-based mail client, and data files submitted to an online application for batch processing all have in common? They all rely on the ability to upload files across the Internet from the user's web browser. Indeed, uploading files is an important feature of many of the sites and web-based applications we use on a daily basis. In this post, I show you how to add support for file uploads to your site using PHP.
</blockquote>
<p>
He starts with the changes you might need to make to your php.ini configuration file (for allowing uploads and setting a temporary directory) and a basic "form" tag with the necessary "enctype" setting. The sample form includes a "file" type field that submits the file data to a waiting PHP script on the backend. The script looks for the submit (in the $_FILES superglobal) and, after doing some filtering on the name and content type, moves it to a new directory.
</p>]]></description>
      <pubDate>Mon, 26 Sep 2011 11:42:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Upload Files with CodeIgniter and AJAX]]></title>
      <guid>http://www.phpdeveloper.org/news/16847</guid>
      <link>http://www.phpdeveloper.org/news/16847</link>
      <description><![CDATA[<p>
New from NetTuts.com today there's a tutorial for those using the <a href="http://codeigniter.com">CodeIgniter</a> framework for their application. It shows how to <a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-upload-files-with-codeigniter-and-ajax/">upload files with Ajax</a> and a simple form (with <a href="http://jquery.com">jQuery</a> and <a href="http://www.phpletter.com/Our-Projects/AjaxFileUpload/">AjaxFileUpload</a>).
</p>
<blockquote>
Uploading files asnychronously can be a pain at the best of times, but when coupled with CodeIgniter, it can be a particularly frustrating experience. I finally found a way that not only works consistently, but keeps to the MVC pattern.
</blockquote>
<p>
They help you create a database table to store the file information in (filename and title), make the controller to handle the request and build the view (with the form). Also included is the javascript you'll need to get the AjaxFileUpload script working for your file upload field. They extend the controller to handle the file upload and make a model to handle the upload and fetching of file information. The tutorial is finished off with a simple "delete" action to remove any file that's been uploaded.
</p>]]></description>
      <pubDate>Mon, 12 Sep 2011 12:03:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: PHP 5.4 features poll: the results]]></title>
      <guid>http://www.phpdeveloper.org/news/16666</guid>
      <link>http://www.phpdeveloper.org/news/16666</link>
      <description><![CDATA[<p>
On DZone.com today <i>Giorgio Sironi</i> has <a href="http://css.dzone.com/articles/php-54-features-poll-results">posted the results</a> of a poll taken a little while back concerning what people thought was the best feature of the upcoming PHP 5.4 release.
</p>
<blockquote>
After two weeks, we have closed the <a href="http://css.dzone.com/polls/what-new-feature-php-54">poll</a> among the PHP community of Web Builder Zone to establish which are the most wanted features, which will influence development of applications on PHP 5.4. Hopefully this poll would also shape our focus in tutorials in the future - I personally plan to dedicate more time to the winning features.
</blockquote>
<p>
Runners up included the removal of magic quotes and strict mode with the top three being (in this order) the upload progress patch, traits and the array improvements leading the pack. You can <a href="http://css.dzone.com/sites/all/files/php54results.png">see the results here</a>.
</p>]]></description>
      <pubDate>Wed, 03 Aug 2011 08:19:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Uploading Files with AJAX]]></title>
      <guid>http://www.phpdeveloper.org/news/16636</guid>
      <link>http://www.phpdeveloper.org/news/16636</link>
      <description><![CDATA[<p>
NetTuts.com has a new tutorial posted showing you some of the basics of <a href="http://net.tutsplus.com/tutorials/javascript-ajax/uploading-files-with-ajax/">uploading files via Ajax</a> a bit more natively.
</p>
<blockquote>
I can't seem to reach the end of the fun stuff you can do with emerging web technologies. Today, I'm going to show you how to do something that-until the last while-has been almost unprecedented: uploading files via AJAX. Oh, sure, there have been hacks; but if you're like me, and feel dirty every time you type iframe, you're going to like this a lot.
</blockquote>
<p>
Their method won't work in every browser, but it can be adapted to work as far back as IE6. The code and markup are included for each of the pieces for the example - the HTML for the upload form, the CSS to help style the resulting list of uploaded images, the simple PHP to handle the uploads and the <a href="http://jquery.org">jQuery</a>-based code that implements the FileReader and FormData objects supported in newer browsers. The end result is a page <a href="http://d2o0t5hpnwv4c1.cloudfront.net/1020_ajaxupload/ajax-upload.png">like this</a> that includes both the form and the list of uploaded images.
</p>]]></description>
      <pubDate>Tue, 26 Jul 2011 13:19:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: What new feature in PHP 5.4 is the most important to you?]]></title>
      <guid>http://www.phpdeveloper.org/news/16612</guid>
      <link>http://www.phpdeveloper.org/news/16612</link>
      <description><![CDATA[<p>
In a new post to DZone.com today <i>Giorgio Sironi</i> asks developers <a href="http://css.dzone.com/polls/what-new-feature-php-54">what new feature of PHP 5.4 is the most important</a> to you and your application development?
</p>
<blockquote>
<a href="http://news.php.net/php.internals/53989">Recently</a>, the voting process for PHP 5.4 open to committers and users have been closed. We now have a clear picture of what will make the release and what will be left out. Some of these features (traits, web server) were already in, while other have been just voted and will be completed before the general availability of the release.
</blockquote>
<p>
He lists out some of the major changes that'll be coming in the 5.4 release including traits, dereferencing, the built-in HTTP server, closure type hinting and the upload progress feature previously only in an extension. The end of <a href="http://css.dzone.com/polls/what-new-feature-php-54">the post</a> includes a poll for you to give your feedback on what you think is the most important. As of the time of this post, the array dereferencing has pulled into the lead with traits coming in second.
</p>]]></description>
      <pubDate>Wed, 20 Jul 2011 10:14:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Testing file uploads with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15571</guid>
      <link>http://www.phpdeveloper.org/news/15571</link>
      <description><![CDATA[<p>
On the QaFoo.com site <i>Manuel Pichler</i> has posted a new tutorial about using unit testing, specifically with <a href="http://phpunit.de">PHPUnit</a> (really ending up on <a href="http://qa.php.net/phpt_details.php">phpt</a>) to test and be sure that your file upload handling is working correctly.
</p>
<blockquote>
A question I am asked on a regular basis is, how you can test a file upload with PHP. In this blog post, I take a precise look at this topic and show you how to test your file uploads from within your standard testing environment, using widely unknown testing framework for PHP.
</blockquote>
<p>
He shows how to use a custom $_FILES superglobal to mimic the upload process noting, however, that this won't work due to possible file handling on the backend. His alternative is to use a phpt test to push a raw posted file to the application and then check the results. He then shows how to take these functioning tests and drop them back into PHPUnit via it's "PhpTestCase" handling. You can find full code examples <a href="https://github.com/Qafoo/blog-examples/tree/master/testing_file_uploads">here</a>.
</p>]]></description>
      <pubDate>Mon, 13 Dec 2010 13:53:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Upload Progress in PHP trunk]]></title>
      <guid>http://www.phpdeveloper.org/news/15538</guid>
      <link>http://www.phpdeveloper.org/news/15538</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has <a href="http://schlueters.de/blog/archives/151-Upload-Progress-in-PHP-trunk.html">a new post</a> to his blog looking at the progress that the upload progress meter extension has been making and how a version of it, put together by <i>Arnaud Le Blanc</i> has been introduced to the trunk line of PHP's code.
</p>
<blockquote>
For implementing this we have one architectural problem: PHP implements, for very good reasons, a shared nothing architecture. So one request from connection has no insight into another request/connection - but this is needed for the upload progress. [...] The obvious solution, of course, would be to use PHP's <a href="http://php.net/session">session handling system</a> for this. [...] Now there were some technical issues why this wasn't done at first ... but then Arnaud Le Blanc sat down and created a proper implementation of an upload progress storage handler which has been commit to PHP trunk. Long story short: In the next version of PHP (5.4?) you will, most likely, have an Upload Progress mechanism built-in.
</blockquote>
<p>
If you want all of the details on it, you can <a href="http://wiki.php.net/rfc/session_upload_progress">check out the RFC</a> on it. <i>Johannes</i> shows a sample of the settings and code that, once the next release of PHP comes out, you can use to enable the extension and be able to poll the session for the progress details.
</p>]]></description>
      <pubDate>Mon, 06 Dec 2010 10:30:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Encrypting uploaded files in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15402</guid>
      <link>http://www.phpdeveloper.org/news/15402</link>
      <description><![CDATA[<p>
In <a href="http://www.codediesel.com/php/encrypting-uploaded-files-in-php/">this new post</a> to his blog <i>Sameer Borate</i> looks at a method he's come up with to encrypt files uploaded into your application with the help of the <a href="http://framework.zend.com/manual/en/zend.filter.set.html">Zend_Filter</a> component of the Zend Framework.
</p>
<blockquote>
As earlier I'd encountered Zends wonderful <a href="http://framework.zend.com/manual/en/zend.filter.set.html">Zend_Filter</a> class, I decided to go with it and use the Zend_Filter_Encrypt and Zend_Filter_Decrypt to accomplish the work. The Zend_Filter component provides a set of common useful data filters, among which are the encryption filters. Although my project was not developed in Zend, I could easily integrate the required classes in the code. Note that Zend has a great upload library, <a href="http://framework.zend.com/manual/en/zend.file.transfer.introduction.html">Zend_File_Transfer</a>, that lets you easily manage file uploading and also encryption, but as I already had the upload code tested, I decided to just add the encryption part.
</blockquote>
<p>
He includes the step-by-step process to get everything you need and which files you'll need to have included from the framework to make things work. He includes code for both encrypting and decrypting the file information as well as hints on selecting an algorithm and a random initialization vector. You can <a href="http://www.codediesel.com/downloads/encrypt">download the complete source</a> if you want to jump right in.
</p>]]></description>
      <pubDate>Tue, 09 Nov 2010 09:43:13 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ProDevTips.com: Multiple File Uploads with XHR and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15335</guid>
      <link>http://www.phpdeveloper.org/news/15335</link>
      <description><![CDATA[<p>
New on ProDevTips.com there's <a href="http://www.prodevtips.com/2010/10/25/multiple-file-uploads-with-xhr-and-php/">a quick tutorial</a> that includes a snippet of code showing you how to upload larger images with the help of HTML5 and <a href="http://valums.com/ajax-upload/">this Ajax uploder</a>.
</p>
<blockquote>
So the jQuery / Flash multiple file uploader has not really been working when it comes to heavy duty stuff "Flash player has crashed" is a common scenario after some six < 2MB pictures, problem is, it needs to be able to handle up to 50 of them. Therefore I decided to check out the HTML5 alternatives and eventually found a really good one. I did have to make some modifications to make the solution fit with my own scenario and I detail them below.
</blockquote>
<p>
He talks about some minor modifications he made to the code (like adding in watermarks) and includes the code for the new "uploadImages()" function that will handle the upload, build a thumbnail and output a result to send back to the uploader for a pass or a fail on the status.
</p>]]></description>
      <pubDate>Tue, 26 Oct 2010 10:08:53 -0500</pubDate>
    </item>
  </channel>
</rss>

