<?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 03:28:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Anthony Ferrara: Preventing CSRF Attacks]]></title>
      <guid>http://www.phpdeveloper.org/news/19207</guid>
      <link>http://www.phpdeveloper.org/news/19207</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has written up a new post to his site looking at <a href="http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html">efective use of CSRF tokens</a> and a few different strategies for generating them.
</p>
<blockquote>
There's been a bit of noise in the past week about the proper way to prevent Cross-Site-Request-Forgery (CSRF) attacks. It seemed to have started with this post. There's been discussion in the comments, and on Twitter about it, and there seems to be several opposing viewpoints on the matter. I want to start off by saying that I agree completely with the post in question. But I figured I'd write a post to explain WHY I agree with it.
</blockquote>
<p>
He starts with an overview of a few of the common types of request forgery including from a javascript injection, a Man-in-the-Middle attack and a replay attack. He then breaks up the "lines of defense" part of the post into three different sections - adding a hidden token field to forms, changing the token for each request and using <a href="http://blog.ircmaxell.com/2011/07/random-number-generation-in-php.html">random numbers</a> when regenrating them.
</p>]]></description>
      <pubDate>Wed, 20 Feb 2013 09:36:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Simplifying Test Data Generation with Faker]]></title>
      <guid>http://www.phpdeveloper.org/news/19203</guid>
      <link>http://www.phpdeveloper.org/news/19203</link>
      <description><![CDATA[<p>
In a new post to PHPMaster.com today, <i>Rakhitha Nimesh</i> <a href="http://phpmaster.com/simplifying-test-data-generation-with-faker/">takes a look at Faker</a>, a tool that can be used to generate random test case data as a part of your workflow.
</p>
<blockquote>
Testing is an iterative part of the development process that we carry out to ensure the quality of our code. A large portion of this entails writing test cases and testing each unit of our application using random test data. Actual data for our application comes in when we release it to production, but during the development process we need fake data similar to real data for testing purposes. The popular open source library Faker provides us with the ability to generate different data suitable for a wide range of scenarios.
</blockquote>
<p>
Faker uses built-in data providers like "Person", "Company", "DateTime" and "UserAgent" to give you randomized output from the data sets you define. Code is included showing how to create the provider in your objects, extending the correct provider and making a request for a property. A real-world example is also included about testing an email marketing engine for address, title, name and content. There's also a little bit added at the end showing how you can increase the randomness of the results returned by "seeding" the Faker engine.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2013 12:09:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder: Generating secure cross site request forgery tokens (csrf)]]></title>
      <guid>http://www.phpdeveloper.org/news/19164</guid>
      <link>http://www.phpdeveloper.org/news/19164</link>
      <description><![CDATA[<p>
In <a href="http://www.eschrade.com/page/generating-secure-cross-site-request-forgery-tokens-csrf/">this new post</a> to his site <i>Kevin Schroeder</i> has a new post with his take on generating more secure CSRF tokens for use in your site.
</p>
<blockquote>
In researching <a href="http://www.eschrade.com/page/the-ibm-i-programmers-guide-to-php-second-edition/">the second edition</a> for the <a href="http://www.amazon.com/IBM-Programmers-Guide-PHP/dp/1583470832">IBM i Programmer's Guide to PHP</a> Jeff and I decided to include a chapter on security since we really didn't talk much about it in the first edition.  I'm talking about cross site request forgeries right now and I wanted to make sure that what I was going to suggest would not <a href="http://www.youtube.com/watch?v=qdjRwpYM-Kw">break the internet</a> in some way. I did some Google searching to see what other people were recommending. 
</blockquote>
<p>
Most of the examples he saw used <a href="http://php.net/md5">md5</a>, <a href="http://php.net/uniqid">uniqid</a> and <a href="http://php.net/rand"> rand</a> to create a randomized hash. He suggests an alternative - a method using the <a href="http://php.net/hash_hmac">hash_hmac</a> and <a href="http://php.net/openssl_random_pseudo_bytes"> openssl_random_pseudo_bytes</a> methods to generate a sha256 hash for use in your page's submissions.
</p>]]></description>
      <pubDate>Mon, 11 Feb 2013 11:23:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Form Mastery with Zend_Config - Part 2, Core Form Configuration]]></title>
      <guid>http://www.phpdeveloper.org/news/17961</guid>
      <link>http://www.phpdeveloper.org/news/17961</link>
      <description><![CDATA[<p>
In his <a href="http://phpdeveloper.org/news/17880">previous post</a> to the MaltBlue.com blog <i>Matt</i> introduced the concept of configuration-driven Zend_Form instances. He's back with a <a href="http://www.maltblue.com/zend-form/zend-form-mastery-with-zend-config-part-2-core-form-configuration">second part to the series</a>, enhancing his original examples by covering some of the base-level form configuration settings.
</p>
<blockquote>
Ok, this should have been part one, but irrespective, here's the second installment in zend form mastery with zend config - core form configuration. As <a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.3">the W3c Form spec</a> says, there are 8 attributes applicable to forms.
</blockquote>
<p>
These attributes, including "action", "name" and "onsubmit", can all be set easily in the XML-based configuration file. He includes an example of the full XML file to show how they all fit together (updated from <a href="http://www.maltblue.com/zend-framework/zend-form-mastery-with-zend-config-part-1-custom-filter-paths">part 1</a>).  You can see an example of the output <a href="http://www.maltblue.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-11.12.44.png">here</a> and can grab the source for the example <a href="https://github.com/maltblue/Zend-Framework-Learning-Modules#zend-framework-learning-modules">from github</a>.
</p>]]></description>
      <pubDate>Tue, 15 May 2012 11:04:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Easy Form Generation Using FuelPHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17672</guid>
      <link>http://www.phpdeveloper.org/news/17672</link>
      <description><![CDATA[<p>
On the NetTuts.com site today there's a new tutorial from <i>Sahan Lakshitha</i> about <a href="http://net.tutsplus.com/tutorials/php/easy-form-generation-using-fuelphp/">creating forms in FuelPHP</a>, the PHP 5.3-centric framework.
</p>
<blockquote>
Thanks to <a href="http://fuelphp.com/">FuelPHP</a>'s <a href="http://docs.fuelphp.com/classes/fieldset.html">fieldset</a> class, working with forms couldn't be easier. With a few lines of code, you can easily generate and validate a form. Today, we're going to learn how to do just that!
</blockquote>
<p>
He starts with guiding you through a simple install of the FuelPHP framework and configuring it to connect to a MySQL database. He shows how to set up a model, specify its properties and creating a controller to handle the user interaction. Using the definitions in the model, FuelPHP can automatically generate a form, complete with default options and some validation on the field (things like "required", "valid_url" and "max_length"). There's also code included showing how to edit current posts and listing out the complete post list.
</p>]]></description>
      <pubDate>Wed, 14 Mar 2012 10:05:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[CodeIgniter.com: New User Guide in Development]]></title>
      <guid>http://www.phpdeveloper.org/news/16957</guid>
      <link>http://www.phpdeveloper.org/news/16957</link>
      <description><![CDATA[<p>
The CodeIgniter development team is happy to announce <a href="http://codeigniter.com/news/new_user_guide_in_development#When:19:23:01Z">work that's been done on the framework's user guide</a> to help make it even better and easier to find the information you're looking for (now based on the <a href="http://sphinx.pocoo.org/">Sphinx documentation generation engine</a>).
</p>
<blockquote>
In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation.  Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples.  Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time.  As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files.
</blockquote>
<p>
There's also been a style redesign in the latest release (<a href="https://github.com/EllisLab/CodeIgniter/commit/8ede1a2ecbb62577afd32996956c5feaf7ddf9b6">here on github</a>) on the development branch of the framework. They warn of a few "bumps" that you might come across in using it, but they're working hard to take care of those quickly. If you'd like to see the new version, check out <a href="http://codeigniter.com/nightly_user_guide/">the nightly build results</a>.
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 09:55:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: Zend Framework Google Analytics Code Generation]]></title>
      <guid>http://www.phpdeveloper.org/news/16764</guid>
      <link>http://www.phpdeveloper.org/news/16764</link>
      <description><![CDATA[<p>
<i>Martin Aarhof</i> has put together <a href="https://github.com/lsv/zf-maa_analytics">an handy tool</a> for Zend Framework applications that creates the async javascript analytic code recommended by Google to provide tracking information back to Analytics.
</p>
<blockquote>
It supports: browser Settings Detection, campaign Duration, campaign Fields (custom), cross-domain linking and last but not least Ecommerce tracking.
</blockquote>
<p>
The configuration lets you set the various keys for your Analytics accounts, the domain name for it to live under, browser detection settings and various other settings for <a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiCampaignTracking.html">campaign configuration</a> and <a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html">domain setup</a>. You can find the full code on <a href="https://github.com/lsv/zf-maa_analytics">his github account</a> ready to download or clone.
</p>]]></description>
      <pubDate>Wed, 24 Aug 2011 09:46:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Random Number Generation In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16617</guid>
      <link>http://www.phpdeveloper.org/news/16617</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post to his blog today looking at true random number generation as it relates to predictability and bias. He <a href="http://blog.ircmaxell.com/2011/07/random-number-generation-in-php.html">also talks about</a> a method/tool you can use (based on RFC 4086) to generate truly random numbers - <a href="https://github.com/ircmaxell/PHP-CryptLib/">PHP-CryptLib</a>.
</p>
<blockquote>
When we talk about "random" numbers, we generally talk about two fundamental properties: Predictability and Bias. Both are closely related, but are subtly different. Predictability in reference to random numbers is the statistical problem of predicting the next value when knowing any number of previous values. Bias on the other hand is the statistical problem of predicting the next value when knowing the distribution of previous values.
</blockquote>
<p>
He looks at how predictability can effect true random number generation and a common mistake in generation related to bias in the calculation method. He talks about <a href="http://us.php.net/manual/en/function.rand.php">some</a> of <a href="http://us.php.net/manual/en/function.mt-rand.php">the</a> <a href="http://us.php.net/manual/en/function.lcg-value.php">functions</a> <a href="http://us.php.net/manual/en/function.uniqid.php">PHP includes</a> to work with randomness, but notes that they all have their flaws. He points to <a href="https://github.com/ircmaxell/PHP-CryptLib/">the PHP-CryptLib</a> package as a solution (adhering to the <a href="http://tools.ietf.org/html/rfc4086">guidelines in RFC 4086</a> for randomness). He includes some sample code of how to use it to generate random numbers, tokens and sets of bytes. You can find the full source <a href="https://github.com/ircmaxell/PHP-CryptLib">over on github</a>.
</p>]]></description>
      <pubDate>Thu, 21 Jul 2011 10:03:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: 6th Generation of ElePHPants is Born!]]></title>
      <guid>http://www.phpdeveloper.org/news/16225</guid>
      <link>http://www.phpdeveloper.org/news/16225</link>
      <description><![CDATA[<p>
The team that has brought you the infamous PHP ElePHPants in the past is <a href="http://www.elephpant.com/first-2-premature">back with another round</a> - the 6th generation of the cuddly PHP mascot in both traditional blue and pink.
</p>
<blockquote>
April 19, 2011 PHP&egrave;re is happy to show you the first pictures of two premature elePHPant the 6th generation of PHP. As you can see ... ElePHPant <a href="http://www.elephpant.com/files/images/6eme-proto-bleu.jpg">the blue</a>, is in great shape and has found its new home very pleasant 
</blockquote>
<p>
These are shots of the first turnouts of this latest batch and the rest will follow in June/July of this year. Those that have already ordered them will be contacted soon and, if you're interested in picking up some of your own, <a href="mailto:webmaster [at] elephpant [point] com">send them an email</a> for complete instructions.
</p>]]></description>
      <pubDate>Wed, 20 Apr 2011 12:11:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Code Generation with ZendCodeGenerator]]></title>
      <guid>http://www.phpdeveloper.org/news/16108</guid>
      <link>http://www.phpdeveloper.org/news/16108</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has put together <a href="http://weierophinney.net/matthew/archives/261-Code-Generation-with-ZendCodeGenerator.html">a beginners guide to code generation</a> with the help of the Zend_CodeGenerator component of the Zend Framework (v2):
</p>
<blockquote>
Zend Framework has offerred a code generation component since version 1.8, when we started shipping Zend_Tool. Zend_CodeGenerator largely mimics PHP's ReflectionAPI, but does the opposite: it instead generates code. [...] ZendCodeGenerator in the ZF2 repository is largely ported from Zend Framework 1, but also includes some functionality surrounding namespace usage and imports.
</blockquote>
<p>
He includes an overview of the different code generation classes available (like PhpBody, PhpFile, PhpProperty, etc) and a bit of code to show you how to create a skeleton class that includes namespace use, class definition and the addition of a "get" method. He also offers some "tips" and "gotchas" to watch out for your first time around like the helpful automagic getter and setter handling.
</p>]]></description>
      <pubDate>Mon, 28 Mar 2011 10:40:29 -0500</pubDate>
    </item>
  </channel>
</rss>
