<?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>Sat, 25 May 2013 01:21:47 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[P&aacute;draic Brady: 20 Point List For Preventing Cross-Site Scripting In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19495</guid>
      <link>http://www.phpdeveloper.org/news/19495</link>
      <description><![CDATA[<p>
<i>P&aacute;draic Brady</i> has <a href="http://blog.astrumfutura.com/2013/04/20-point-list-for-preventing-cross-site-scripting-in-php/">posted a 20 point list</a> that wants to help you prevent cross-site scripting (XSS) issues in your applications.
</p>
<blockquote>
Summarising knowledge has as much value as writing a 200 page treatise on a topic, so here is a list of 20 brief points you should bear in mind when battling Cross-Site Scripting (XSS) in PHP. Minus my usual book length brain fart  . Chances are good that ignoring or acting contrary to any one of these will lead to a potential XSS vulnerability. It's not necessarily a complete list - if you think something needs to be added, let everyone know in the comments.
</blockquote>
<p>His tips include things like:</p>
<ul>
<li>Never pass data from untrusted origins into output without either escaping or sanitising it.
<li>Remember that anything not explicitly defined in source code has an untrusted origin.
<li>Always include ENT_QUOTES, ENT_SUBSTITUTE and a valid character encoding when calling htmlspecialchars().
<li>Use rawurlencode() to escape strings being inserted into URLs and then HTML escape the entire URL.
<li>Validate all complete URLs if constructed from untrusted data.
<li>Remember that HTMLPurifier is the only HTML sanitiser worth using.
<li>Ensure that cookies which must only be transmitted over HTTPS are marked Secure.
</ul>
<p>
He points out that XSS is still one of the most "popular" (and easy to exploit) attack methods out there, so keep these tips in mind when writing up your code.
</p>
Link: http://blog.astrumfutura.com/2013/04/20-point-list-for-preventing-cross-site-scripting-in-php]]></description>
      <pubDate>Tue, 23 Apr 2013 09:27:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Thomas Buck: Tom's PHP Commandments - Take heed]]></title>
      <guid>http://www.phpdeveloper.org/news/19475</guid>
      <link>http://www.phpdeveloper.org/news/19475</link>
      <description><![CDATA[<p>
<i>Thomas Buck</i> has put together what he calls "Tom's PHP Commandments" (nine of them) that developers should follow when developing applications with the language. Among his suggestions are things like:
</p>
<ul>
<li>ALWAYS do the simplest thing that will work
<li>NEVER trust anything that comes from the user
<li>NEVER use include for controlling logic
<lI>NEVER create a file of useful functions, even if it's called helpers.php
</ul>
<p>
There's also been some discussion about this list <a href="http://www.reddit.com/r/PHP/comments/1cegz6/php_commandments_xpost_from_rprogramming/">over on Reddit</a> - you can comment on it over there if you agree/disagree with some of his points.
</p>
Link: http://biasedphp.com/php-commandments]]></description>
      <pubDate>Wed, 17 Apr 2013 12:23:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: What's New in Laravel 4]]></title>
      <guid>http://www.phpdeveloper.org/news/19002</guid>
      <link>http://www.phpdeveloper.org/news/19002</link>
      <description><![CDATA[<p>
In <a href="http://phpmaster.com/whats-new-in-laravel-4/">this new post</a> to PHPMaster.com today <i>Alexander Cogneau</i> takes a look at what's different in version four (v4) of the <a href="http://laravel.com">Laravel</a> framework as it has changed from version three.
</p>
<blockquote>
Laravel is a PHP framework which uses the MVC pattern. Of course, there are many such projects and I'm not going to compare Laravel with other frameworks in this article. Instead, I'm going to share with you what's new in the newest version of Laravel - Laravel 4.
</blockquote>
<p>There's a list of things that have changed (each with a summary of what they are):</p>
<ul>
<li>Decoupled Components
<li>Creating a "Normal" Project
<li>Routes
<li>Better Code through Testing
<li>The Container and Its Bindings
<li>Improved CLI
<li>New Database Features
<li>Using Stand-Alone Components
</ul>]]></description>
      <pubDate>Mon, 07 Jan 2013 13:25:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Powerful Command Line Tools For Developers]]></title>
      <guid>http://www.phpdeveloper.org/news/18675</guid>
      <link>http://www.phpdeveloper.org/news/18675</link>
      <description><![CDATA[<p>
On the Smashing Magazine site today they've <a href="http://coding.smashingmagazine.com/2012/10/29/powerful-command-line-tools-developers/">posted a list of powerful CLI tools</a> that every developer should at least know about to help make their lives easier - six of them ranging from SSH tunnels to HTTP testing.
</p>
<blockquote>
Good tools are invaluable in figuring out where problems lie, and can also help to prevent problems from occurring in the first place, or just help you to be more efficient in general. Command line tools are particularly useful because they lend themselves well to automation and scripting, where they can be combined and reused in all sorts of different ways. Here we cover six particularly powerful and versatile tools which can help make your life a little bit easier.
</blockquote>
<p>The tools they mention are all things you'd install on a unix-based system:</p>
<ul>
<li>Curl
<li>Ngrep (network packet searching)
<li>Netcat (to work with network connections)
<li>Sshuttle (SSH tunneling)
<li>Siege (HTTP benchmarking)
<li>Mitmproxy (capturing proxy, both HTTP and HTTPS)
</ul>]]></description>
      <pubDate>Tue, 30 Oct 2012 10:18:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: List Files and Directories with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18644</guid>
      <link>http://www.phpdeveloper.org/news/18644</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial showing you how to <a href="http://phpmaster.com/list-files-and-directories-with-php/">work with files and directories</a> through your PHP applications. 
</p>
<blockquote>
In this article I'll talk about a common task you might have experienced while developing a PHP application: listing files and directories. I'll discuss several basic and advanced solutions, each having its pros and cons. First I'll present three approaches that use some very basic PHP functions and then progress to more robust ones which make use of SPL Iterators.
</blockquote>
<p>
The solutions they look at are the built-in functions like <a href="http://php.net/glob">glob</a> and <a href="http://php.net/readdir">readdir</a>/<a href="http://php.net/opendir">opendir</a> as well as SPL iterators up for the task - FilesystemIterator, RecursiveDirectoryIterator and GlobIterator. Code samples are included in the post, showing how to use each method to get and list the files. A few helpful hints are also included to finish off the tutorial (mostly about "tricks" to using the functions effectively).
</p>]]></description>
      <pubDate>Tue, 23 Oct 2012 08:56:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jim Bird: How to Cheat at Application Security]]></title>
      <guid>http://www.phpdeveloper.org/news/18473</guid>
      <link>http://www.phpdeveloper.org/news/18473</link>
      <description><![CDATA[<p>
<i>Jim Bird</i> has a new post with links to a few different resources helping you <a href="http://swreflections.blogspot.ca/2012/09/how-to-cheat-at-application-security.html">"cheat" at application security</a> - links to cheat sheets with highlights of key points to keep an eye out for.
</p>
<blockquote>
Developers need to know a lot in order to build secure applications. Some of this is good software engineering and defensive design and programming - using (safe) APIs properly, carefully checking for errors and exceptions, adding diagnostics and logging, and never trusting anything from outside of your code (including data and other people's code). But there are also lots of technical details about security weaknesses and vulnerabilities in different architectures and platforms and technology-specific risks that you have to understand and that you have to make sure that you deal with properly. Even appsec specialists have trouble keeping up with all of it.
</blockquote>
<p>
He links to several of the <a href="http://owasp.org">OWASP</a> cheat sheets for things like:
</p>
<ul>
<li><a href="https://www.owasp.org/index.php/Authentication_Cheat_Sheet">authentication best practices</a>
<li><a href="https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet">using HTML5</a>
<li><a href="https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet">preventing SQL injection</a>
<li><a href="https://www.owasp.org/index.php/Input_Validation_Cheat_Sheet">input validation</a>
</ul>]]></description>
      <pubDate>Thu, 13 Sep 2012 10:42:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Programmers Community Blog: 20 controversial programming opinions]]></title>
      <guid>http://www.phpdeveloper.org/news/18440</guid>
      <link>http://www.phpdeveloper.org/news/18440</link>
      <description><![CDATA[<p>
On the Programmers Community Blog there's a post (with quite a bit of feedback) that lists <a href="http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/">twenty controversial opinions</a> about programming and programmers in general that have been proposed over the years.
</p>
<blockquote>
One of the very first ideas we had for this blog was to convert some of the wonderful gems of the early era of our site, the undisciplined period, to blog posts. Questions that were once enthusiastically received by the community, but no longer fit Programmer's scope.
</blockquote>
<p>
The post has the top twenty answers to the "What's your most controversial programming opinion?" question as proposed on StackOverflow and includes things like:
</p>
<ul>
<li>Programmers who don't code in their spare time for fun will never become as good as those that do.
<li>The only "best practice" you should be using all the time is "Use Your Brain".
<li>Not all programmers are created equal.
<li>If you only know one language, no matter how well you know it, you're not a great programmer.
<li>Your job is to put yourself out of work.
<li>Readability is the most important aspect of your code.
</ul>
<p>
Check out <a href="http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/">the full post</a> for the complete list...and for the 100+ comments that have been added to it by programmers with both agreeable and disagreeable opinions.]]></description>
      <pubDate>Tue, 04 Sep 2012 10:14:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: PHPMaster Security Roundup]]></title>
      <guid>http://www.phpdeveloper.org/news/18240</guid>
      <link>http://www.phpdeveloper.org/news/18240</link>
      <description><![CDATA[<p>
Security has become more of a hot topic in the PHP community recently and PHPMaster.com has <a href="http://phpmaster.com/phpmaster-security-roundup/?">pulled together a list of resources</a> you can read up on to get some great ideas for securing your application.
</p>
<blockquote>
The unfortunate truth of the matter is there's no excuse for [the LinkedIn, Yahoo!, eHarmony and Last.fm] leaks; they would not have been possible if simple, well-known security precautions were taken. Are you protecting yourself and your applications by guarding against SQL-injection attacks? Are you filtering and validating user input? Are you properly hashing user passwords? I hope so! If not, read some of the security-focused articles PHPMaster has published throughout the past year and apply these best practices to your code today!
</blockquote>
<p>Articles in their list include:</p>
<ul>
<li><a href="http://phpmaster.com/why-you-should-use-bcrypt-to-hash-stored-passwords/">Why You Should Use Bcrypt to Hash Stored Passwords</a>
<li><a href="http://phpmaster.com/input-validation-using-filter-functions/">Input Validation Using Filter Functions</a>
<li><a href="http://phpmaster.com/multi-factor-authentication-with-php-and-twilio/">Multi-Factor Authentication with PHP and Twilio</a>
<li><a href="http://phpmaster.com/monitoring-file-integrity">Monitoring File Integrity</a>
</ul>
<p>
Check out the <a href="http://phpmaster.com/phpmaster-security-roundup/?">rest of the post</a> for links to other great articles.
</p>]]></description>
      <pubDate>Wed, 18 Jul 2012 09:22:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[CodeDevelopr.com: 50 Web Developer Documentation Manuals You Need To Know About]]></title>
      <guid>http://www.phpdeveloper.org/news/18133</guid>
      <link>http://www.phpdeveloper.org/news/18133</link>
      <description><![CDATA[<p>
The CodeDevelopr.com site has posted a <a href="http://www.codedevelopr.com/50-web-developer-documentation-manuals-you-need-to-know-about/">handy reference list</a> of 50+ guides and manuals that can make looking up those key facts easier.
</p>
<blockquote>
This is a list of over 50+ Documentation Manuals and Guides for Programmers, Web Developers, and Web Designers. I will actively update this list with more Manuals as I come across them. If you would like something added, please leave it in the comments section below. Over time it will become more refined and better organized and in return, more useful so please bookmark and share with your friends.
</blockquote>
<p>Linked resources include:</p>
<ul>
<li><a href="http://www.php.net/manual/en/">the PHP manual</a>
<li>the <a href="https://developer.mozilla.org/en/HTML/HTML5">HTML5 reference</a>
<li><a href="http://framework.zend.com/docs/overview">Zend Framework docs</a>
<li><a href="http://redis.io/documentation">Redis docs</a>
<li><a href="http://dochub.io/">Dochub.io</a> (online code searching)
</ul>]]></description>
      <pubDate>Mon, 25 Jun 2012 11:55:11 -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>
  </channel>
</rss>
