<?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>Mon, 20 May 2013 00:14:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Extract an Excerpt from a WAV File]]></title>
      <guid>http://www.phpdeveloper.org/news/19181</guid>
      <link>http://www.phpdeveloper.org/news/19181</link>
      <description><![CDATA[<p>
In <a href="http://phpmaster.com/extract-an-exceprt-from-a-wav-file/">this new post</a> to PHPMaster.com, <i>Aurelio De Rosa</i> covers an interesting use of PHP that could be handy in certain circumstances - extracting a section of a WAV audio file using the <a href="https://bitbucket.org/AurelioDeRosa/audero-wav-extractor">Audero Wav Extractor</a> library.
</p>
<blockquote>
Although PHP is well known for building web pages and applications, it can do more than that. I recently needed to extract a piece of audio from a WAV file on-the-fly and let the user download it through his browser. I tried to find a library that fit my needs but wasn't successful and had to write the code myself. It was a good opportunity to study in depth how a WAV file is made. 
</blockquote>
<p>
He starts off with an overview of what a WAV file is, how it's structured and how you can correctly figure out where in the binary data of the file the section you want is located. He then introduces <a href="https://bitbucket.org/AurelioDeRosa/audero-wav-extractor">the library</a> and shows how to use it to extract "chunks" from the WAV file. He also includes an example of pulling out a chunk and saving it off to another file.
</p>]]></description>
      <pubDate>Thu, 14 Feb 2013 10:44:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Dev.Umpirsky.com: Use Poedit to Extract Translations from Twig Templates]]></title>
      <guid>http://www.phpdeveloper.org/news/18441</guid>
      <link>http://www.phpdeveloper.org/news/18441</link>
      <description><![CDATA[<p>
In <a href="http://dev.umpirsky.com/use-poedit-to-extract-translations-from-twig-templates/">this new post</a> to the Umpirsky.com development blog, they show you how to use <a href="http://www.poedit.net/">poedit</a> to extract translations from Twig templates.
</p>
<blockquote>
By default, Poedit does not have the ability to parse Twig templates. In Twig documenation there is a simple example which shows how to extract translations. This can work with few modifications, but I wanted to make reusable tool which will allow you to parse Twig templates just like you do with plain PHP templates.
</blockquote>
<p>
The result is the <a href="https://github.com/umpirsky/Twig-Gettext-Extractor">Twig-Gettext-Extractor</a> that's set up inside Poedit as a parser command for "*.twig" files. This automatically extracts the information so that the editor can read the data from the template.
</p>]]></description>
      <pubDate>Tue, 04 Sep 2012 11:34:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebSpeaks.in: Extract the Content of Zip file Using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18088</guid>
      <link>http://www.phpdeveloper.org/news/18088</link>
      <description><![CDATA[<p>
On the WebSpeaks.in site, there's a recent tutorial posted showing how you can <a href="http://www.webspeaks.in/2012/06/extract-content-of-zip-file-using-php.html">extract the contents of a zip file</a> from inside a PHP application.
</p>
<blockquote>
Sometimes you may want the users on your site to upload the zip file and then check what are the contents of that zip file. In this article I will tell you how to extract the contents of the zip file. I temporarily extract the zip files to a directory and then delete it afterwards. You can chose to keep the extracted content if you want. 
</blockquote>
<p>
The tutorial walks you through the code, showing you how to use their "ZipArchive" class to grab the file, extract the contents and display a list of the "child files" inside it. You can see a <a href="http://demos.webspeaks.in/zip/">live demo</a> of it in action or just <a href="https://www.box.com/s/3e3ee33e1e6bf503c057">download the source</a> and dive right in.
</p>]]></description>
      <pubDate>Wed, 13 Jun 2012 10:44:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 5]]></title>
      <guid>http://www.phpdeveloper.org/news/17172</guid>
      <link>http://www.phpdeveloper.org/news/17172</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="phpmaster.com/localizing-php-applications-5">fifth part</a> of their "Localizing PHP Applications 'The Right Way'" series, this time with a focus on extracting data from the .pot template files to define in your PHP. (This is the final part of the series.)
</p>
<blockquote>
In <a href="http://phpmaster.com/localizing-php-applications-4">Part 4</a> you learned how to use gettext for one of the most complex aspects of localization a developer can face, plural forms. In this, the final part of the five-part series, I'll teach you how you to automate part of the localization process by extracting msgids and generating a PO template file (.pot) from your application's PHP code.
</blockquote>
<p>
They show how to use the xgettext command-line tool to pull out strings from your source and automatically make them into a domain template. They help you set up three sample PHP files and run the xgettext command on them to pull out messages defined in the text of the files to set up keys in the template. Screenshots are included showing how to use Poedit to use these templates for your new translations.
</p>]]></description>
      <pubDate>Fri, 25 Nov 2011 14:58:09 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kae Verens' Blog: Extracting a sudoku puzzle from a photo]]></title>
      <guid>http://www.phpdeveloper.org/news/11881</guid>
      <link>http://www.phpdeveloper.org/news/11881</link>
      <description><![CDATA[<p>
<i>Kae Verens</i> has posted a <a href="http://verens.com/archives/2009/02/03/extracting-a-sudoku-puzzle-from-a-photo/">cool little application</a> of how to pull information out of a photo and parse it with the GD library. His example is a <a href="http://verens.com/archives/2009/02/02/visual-sudoku-solver/">visual sudoku solver</a> (part one, at least).
</p>
<blockquote>
The plan for this one is that, if you're doing a sudoku puzzle in the pub or on the train, and you get stuck, you just take a snapshot of the puzzle with your camera-phone, send the photo to a certain mobile number, and a few seconds later the solution is sent back as an SMS message. The solution costs you something small - 50 cents, maybe.
</blockquote>
<p>
The script looks at a picture of a sudoku puzzle, converts it to b&w and tries to find the squares surrounding each position of the board. With these measurements, the next step is to grab the numbers already in the puzzle and hand those off to the puzzle solver to be processed.
</p>]]></description>
      <pubDate>Wed, 04 Feb 2009 12:57:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Refactoring 2: Extract Method]]></title>
      <guid>http://www.phpdeveloper.org/news/11723</guid>
      <link>http://www.phpdeveloper.org/news/11723</link>
      <description><![CDATA[<p>
<i>Sameer</i> has <a href="http://www.codediesel.com/refactoring/refactoring-2-extract-method/">posted the second part</a> of his series looking at refactoring with a spotlight on the Extract method.
</p>
<blockquote>
The 'Extract Method' is one of the most common refactorings you will ever do. It is also one you will frequently see implemented on the Refactor tool menu on various IDE's. What this method basically does is to take a group of related code and convert it to a function with a appropriate name that easily explains the purpose of the code.
</blockquote>
<p>
He gives a code example - converting hotel room price to points based on the currency its requested in - both with and without the Extract method in use.
</p>]]></description>
      <pubDate>Mon, 12 Jan 2009 20:18:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPImact Blog: Refactoring the Front Controller of the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/10869</guid>
      <link>http://www.phpdeveloper.org/news/10869</link>
      <description><![CDATA[<p>
The PHP::Impact blog has a <a href="http://phpimpact.wordpress.com/2008/08/20/refactoring-the-front-controller-of-the-zend-framework/">new tutorial</a> posted today with a look at a refactoring of the front controller of the Zend Framework to make it a bit more manageable.
</p>
<blockquote>
One of the most fundamental decision in object design is deciding where to put responsibilities. No one, and I mean no one, gets it right the first time. That's why refactoring is so important. As Kent Beck puts it, refactoring is the process of taking a system and adding to its value, not by changing its behaviour but by giving it more of these qualities that enable us to continue developing at speed.
</blockquote>
<p>
He follows the "extract" refactoring method that makes things simpler by removing unneeded parts of the code (in favor of an interchangeable external "extract class". He removes seven methods from the class and splits them off into their own. This reduces the controller down to a more manageable size and takes a lot of the complexity out. 
</p>]]></description>
      <pubDate>Wed, 20 Aug 2008 14:04:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials Blog: Extracting text from Word Documents via PHP and COM]]></title>
      <guid>http://www.phpdeveloper.org/news/9861</guid>
      <link>http://www.phpdeveloper.org/news/9861</link>
      <description><![CDATA[<p>
In a <a href="http://www.developertutorials.com/blog/php/extracting-text-from-word-documents-via-php-and-com-81/">recent blog post</a> <i>Akash Mehta</i> showed how to reach into a Microsoft document (a Word file) and pull out the content inside via a PHP script.
</p>
<blockquote>
Communicating via COM in PHP is easy as ever; especially for people coming from a VB background where executing complex tasks in MS-applications is a piece of cake, you will feel right at home in PHP. In fact, VB COM calls can be converted to PHP COM calls in just a few simple search and replaces.
</blockquote>
<p>
He shows how to use the COM extension in a (Windows) PHP installation to access the text inside the document and manipulate the contents however you'd like (even writing them back out to another Word file).
</p>]]></description>
      <pubDate>Wed, 26 Mar 2008 12:02:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[JSLabs: How to create a self extracting PHP script]]></title>
      <guid>http://www.phpdeveloper.org/news/8808</guid>
      <link>http://www.phpdeveloper.org/news/8808</link>
      <description><![CDATA[<p>
<i>Justin Silverton</i> has <a href="http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/">posted about</a> a method he's found to create a self-extracting PHP script for your application:
</p>
<blockquote>
PHP has a built-in command called __HALT_COMPILER__. This command Halts the execution of the compiler. This can be useful to embed data in PHP scripts. Below is an example of a self-extracting php script. When executed, a second php file will be extracted in the same directory called testscript1.php.
</blockquote>
<p>
<a href="http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/">The post</a> includes the code and a brief explaination of how it works.
</p>]]></description>
      <pubDate>Tue, 09 Oct 2007 11:33:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andries Seutens' Blog: Zend Framework, just get me started, okay?]]></title>
      <guid>http://www.phpdeveloper.org/news/8087</guid>
      <link>http://www.phpdeveloper.org/news/8087</link>
      <description><![CDATA[<p>
<i>Andries Seutens</i> has created <a href="http://andries.systray.be/blog/2007/06/18/zend-framework-just-get-me-started-okay/">his own quickstart method</a> for working with the Zend Framework and in his latest post, he shares the files.
</p>
<blockquote>
If you are looking for a quick way to get started with the Zend Framework, then you should <a href="http://andries.systray.be/files/conventional.rar">download this file</a>. This download has a default setup for the <a href="http://framework.zend.com/">Zend Framework</a>, including: a conventional directory structure, a bootstrap file, configuration file with 2 stages: production, staging, an error controller, an index controller and more.
</blockquote>
<p>
For course, you'll have to have <a href="http://framework.zend.com/download">the framework</a> installed to get things up and running, but outside of that you'll only need to put the downloaded files above into the right place.
</p>]]></description>
      <pubDate>Wed, 20 Jun 2007 12:03:00 -0500</pubDate>
    </item>
  </channel>
</rss>
