<?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>Wed, 19 Jun 2013 07:22:32 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Reddit.com: Let's talk Character Encoding]]></title>
      <guid>http://www.phpdeveloper.org/news/17680</guid>
      <link>http://www.phpdeveloper.org/news/17680</link>
      <description><![CDATA[<p>
On Reddit.com there's <a href="http://www.reddit.com/r/PHP/comments/qxacr/rphp_lets_talk_character_encoding/">a recent post</a> with a growing discussion about character encodings in PHP applications (with some various recommendations).
</p>
<blockquote>
I would rather not have to convert these weird characters to the HTML character entities, if possible. I'd rather be able to use these characters directly on the web page. If this is for some reason a bad idea, let me know. This might be more of a general web design question (i already posted it there), but I figured it is still appropriate to post here as well since PHP is used to pull an entry from the database, and I figured a lot of you here would know the answer to the question. 
</blockquote>
<p>
The general consensus is to use UTF8 in this case, but there's a few reminders for the poster too:
</p>
<ul>
<li>Don't forget to make the database UTF8 too
<li>Be sure you're sending the right Content-Type for the UTF8 data
<li>an <a href="http://www.joelonsoftware.com/articles/Unicode.html">link to an article</a> about what "developers must know about unicode/charactersets"
</ul>]]></description>
      <pubDate>Thu, 15 Mar 2012 11:07:07 -0500</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[Matthew Weier O'Phinney's Blog: Responding to Different Content Types in RESTful ZF Apps]]></title>
      <guid>http://www.phpdeveloper.org/news/14139</guid>
      <link>http://www.phpdeveloper.org/news/14139</link>
      <description><![CDATA[<p>
Continuing on from his <a href="http://weierophinney.net/matthew/archives/227-Exposing-Service-APIs-via-Zend-Framework.html">previous</a> <a href="http://weierophinney.net/matthew/archives/228-Building-RESTful-Services-with-Zend-Framework.html">articles</a> on working with REST in Zend Framework applications (and making the endpoints for a web service) <i>Matthew Weier O'Phinney</i> has a new tutorial with the next logical step in the series, automatically <a href="http://weierophinney.net/matthew/archives/233-Responding-to-Different-Content-Types-in-RESTful-ZF-Apps.html">responding to different content types</a> in your application based on the content-type the client sends.
</p>
<blockquote>
There's no reason you can't re-use your RESTful web service to support multiple formats. Zend Framework and PHP have plenty of tools to assist you in responding to different format requests, so don't limit yourself. With a small amount of work, you can make your controllers format agnostic, and ensure that you respond appropriately to different requests.
</blockquote>
<p>
He talks about concerns you'll have to worry about when developing your service - grabbing teh raw input instead of the POST values (since most requests will be rawly POSTed) and what to pass that message to to decode it properly. In his example the Zend_Json and Zend_Config_Xml components make it simpler to handle the info and some code to get the results back into your script.
</p>
<p>
There's also some code for the other side of things - building the response and pushing it out to the correct views depending on the request content type, action and information.
</p>]]></description>
      <pubDate>Fri, 05 Mar 2010 12:20:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: How to create an optimized version of your website for the iPhone in symfony 1.1]]></title>
      <guid>http://www.phpdeveloper.org/news/10402</guid>
      <link>http://www.phpdeveloper.org/news/10402</link>
      <description><![CDATA[<p>
With the recent stir caused by the new iPhone, it's only natural that developers are looking for easy ways to make their sites as compatible as possible with the mobile platform. The Symfony project has <a href="http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1">posted a guide</a> to helping you make your apps optimized for mobile use.
</p>
<blockquote>
symfony 1.1 introduces native support for different formats and mime-types. This means that the same model and controller can have different templates based on the requested format. The default format is still HTML but symfony supports several other formats out of the box as defined in the factories.yml file.
</blockquote>
<p>
Using this system, it's easy to add new output formats by adding to the default layouts the framework comes equipped with. The Content-Type can be changed and layouts can be disabled as needed. This lets you make a custom definition just for use with the iPhone without a lot of hassle.
</p>
<p>
They also <a href="http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1">include an example</a> of how to make one of these optimized layouts, including some iPhone "screenshots" of the resulting pages.
</p>]]></description>
      <pubDate>Thu, 12 Jun 2008 14:24:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Interesting Bug in the HTTP Streams Wrapper]]></title>
      <guid>http://www.phpdeveloper.org/news/9965</guid>
      <link>http://www.phpdeveloper.org/news/9965</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has come across an <a href="http://ishouldbecoding.com/2008/04/10/interesting-bug-in-the-http-streams-wrapper">"interesting bug"</a> in PHP's stream wrappers functionality - some strange 404 or 500 HTTP errors in one of his scripts.
</p>
<blockquote>
I wrote a <a href="http://ishouldbecoding.com/2008/04/user/files/pastebin.phps">small script</a> a while back that's gained a surprising amount of popularity thanks to a plug from the site that it posts to. [...] I learned that this [connection from the script] could be done with streams, I attempted to implement it in that fashion, but ran into strange issues where I would get 404 or 500-level HTTP errors rather than the response I was expected.
</blockquote>
<p>
He eventually found <a href="http://bugs.php.net/bug.php?id=44603">the bug</a> related to his problem (in the 5.2.x branch) but happily notes that it has been corrected and will be patched in the upcoming 5.3 (and 6) branches.
</p>]]></description>
      <pubDate>Mon, 14 Apr 2008 08:49:04 -0500</pubDate>
    </item>
  </channel>
</rss>
