<?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, 06 Sep 2008 01:07:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DevShed: Validating Web Forms with the Code Igniter PHP Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/10961</guid>
      <link>http://www.phpdeveloper.org/news/10961</link>
      <description><![CDATA[<p>
DevShed has posted the <a href="http://www.devshed.com/c/a/PHP/Validating-Web-Forms-with-the-Code-Igniter-PHP-Framework/">fourth part</a> in their introduction to the CodeIgniter framework. This time they focus on form validation.
</p>
<blockquote>
If you're a web developer, you've probably written any number of scripts designed to validate the input entered into a web form. More than likely, then, you'd like something that will make that job easier. Enter the Code Igniter PHP framework. In this fourth part of a nine-part series on this framework, you'll learn how to use it to do basic validation on a web form.
</blockquote>
<p>
Making and validating forms in CodeIgniter is a pretty simple process thanks to the built-in validation features of the framework. They show you how to create a form and how to <a href="http://www.devshed.com/c/a/PHP/Validating-Web-Forms-with-the-Code-Igniter-PHP-Framework/1/">implement</a> the validation and output <a href="http://www.devshed.com/c/a/PHP/Validating-Web-Forms-with-the-Code-Igniter-PHP-Framework/2/">error messages</a> when an issue comes up.
</p>]]></description>
      <pubDate>Thu, 04 Sep 2008 10:28:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mind Tree: Testing your web application]]></title>
      <guid>http://www.phpdeveloper.org/news/10833</guid>
      <link>http://www.phpdeveloper.org/news/10833</link>
      <description><![CDATA[<p>
<a href="http://www.hurricanesoftwares.com/2008/08/11/testing-your-web-application/">This recent post</a> from the Mind Tree blog shares a few methods for testing your web application (not unit test, just general things).
</p>
<blockquote>
Because the Web "environment" is so diverse and contains so many forms of programmatic content, input validation and sanity checking is the key to Web applications security. This involves both identifying and enforcing the valid domain of every user-definable data element, as well as a sufficient understanding of the source of all data elements to determine what is potentially user definable.
</blockquote>
<p>
They note that the root of most problems is input validation - most applications either just don't do it or do it poorly. They include a few tips on first security the environment the application is running in (like checking the HEAD/OPTIONS values and ensuring you're only allowing known file extensions and directories). They also mention the insecurity behind HIDDEN form elements and some issues surrounding user authentication.
</p>]]></description>
      <pubDate>Thu, 14 Aug 2008 12:04:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Accessing Incoming PUT Data from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10728</guid>
      <link>http://www.phpdeveloper.org/news/10728</link>
      <description><![CDATA[<p>
For a recent REST web service project, <i>Lorna Mitchell</i> had to put together a server for the remote clients to use. She started with a GET request then moved to handling a POST request then to a PUT request - that's where <a href="http://www.lornajane.net/posts/2008/Accessing-Incoming-PUT-Data-from-PHP">the difficulty came in</a>:
</p>
<blockquote>
PHP doesn't have a built-in way to do this, and at first I was a little confused as to how I could reach this information. It turns out that this can be read from the incoming stream to PHP, php://input.
</blockquote>
<p>
Pulling from that stream gave her the raw data she needed (nicely urlencoded too) that she could parse out and use. She includes a simple example that has a check for the REQUEST_TYPE in the _SERVER superglobal to see how the request should be handled (PUT versus GET).
</p>]]></description>
      <pubDate>Thu, 31 Jul 2008 12:05:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Can You Hack Your Own Site? A Look at Some Essential Security Considerations]]></title>
      <guid>http://www.phpdeveloper.org/news/10659</guid>
      <link>http://www.phpdeveloper.org/news/10659</link>
      <description><![CDATA[<p>
On the NETTUTS.com website, there's a <a href="http://nettuts.com/articles/can-you-hack-your-own-site-a-look-at-some-essential-security-considerations/">great article</a> with some "essential security considerations" that you can use to see just how hackable your site could be.
</p>
<blockquote>
This article walks through the brainstorming stage of planning for what is in this instance, a hypothetical user-centric web application. Although you won't be left with a complete project '" nor a market ready framework, my hope is that each of you, when faced with future workloads, may muse on the better practices described. So, without further ado...Are you sitting comfortably?
</blockquote>
<p>
<a href="http://nettuts.com/articles/can-you-hack-your-own-site-a-look-at-some-essential-security-considerations/">The tutorial</a> is broken up into a few sections based around an example with a few points of failure (about book information). They work through the thought process behind the code, using the $_REQUEST variables correctly, preventing SQL injections, filtering the HTML output and a <a href="http://nettuts.s3.amazonaws.com/Articles/009_Security/NETTUTS-SEC/sources.zip">sample code</a> download for you to see how it's all tied together.
</p>]]></description>
      <pubDate>Tue, 22 Jul 2008 12:57:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebReference.com: Working With Forms]]></title>
      <guid>http://www.phpdeveloper.org/news/9881</guid>
      <link>http://www.phpdeveloper.org/news/9881</link>
      <description><![CDATA[<p>
The WebReference.com website has an <a href="http://www.webreference.com/programming/php/working_with_forms/">introductory tutorial</a> showing the budding PHP develper how to get started with one of the keys to web application interaction - forms.
</p>
<blockquote>
Forms are how your users talk to your scripts. To get the most out of PHP, you must master forms. The first thing you need to understand is that although PHP makes it easy to access form data, you must be careful of how you work with the data.
</blockquote>
<p>
The first part of the tutorial is focused on something many applications don't worry about - the security and integrity of the data submitted to them. They talk about things like filtering and various other checks to ensure that the data you're getting is good. They also mention the method for putting submitted values into PHP arrays, checking for valid values, using multiple submit buttons and an example of some of these methods all put together - validating a credit card number.
</p>]]></description>
      <pubDate>Mon, 31 Mar 2008 10:25:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Funcaday.com: Special Valentines Day Edition (isLove)]]></title>
      <guid>http://www.phpdeveloper.org/news/9630</guid>
      <link>http://www.phpdeveloper.org/news/9630</link>
      <description><![CDATA[<p>
Besides all of the usual Valentines day logo fun from some of the <a href="http://www.google.com">major</a> <a href="http://youtube.com">sites</a> out there, <i>Paul Reinheimer</i> also <a href="http://blog.preinheimer.com/index.php?/archives/264-Happy-Valentines-Day-The-funcaday-way.html">points out</a> a special little something on the <a href="http://funcaday.com/">Funcaday.com</a> website:
</p>
<blockquote>
Want a custom one to share with someone you care about. Fill out the form <a href="http://funcaday.com/form.php">here</a>. It's a subtle effect though, they'll need to read it. Valid characters for names are just alphabetics and the underscore, sorry.
</blockquote>
<p>
The custom output is a great little addition to the site - put in person one's name and person two's name and it <a href="http://funcaday.com/?d=Y2hyaXM6cGhw">updates the image</a> to show the new parameters. Ah, geek love...
</p>]]></description>
      <pubDate>Thu, 14 Feb 2008 08:49:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ed Finkler's Blog: Inspekt 0.3 now available]]></title>
      <guid>http://www.phpdeveloper.org/news/9462</guid>
      <link>http://www.phpdeveloper.org/news/9462</link>
      <description><![CDATA[<p>
<i>Ed Finkler</i> has <a href="http://funkatron.com/index.php/site/comments/inspekt-03-now-available/#When:16:56:00Z">released the latest version</a> of his <a href="http://inspekt.org/">Inspekt</a> input filtering/output validation library for PHP5:
</p>
<blockquote>
I've uploaded the 0.3 release of <a href="http://inspekt.org/">Inspekt</a>, the input filtering and validation library for PHP4 and 5. With this release, Inspekt completes the goals of the original specification for the <a href="https://www.owasp.org/">OWASP</a> <a href="http://www.owasp.org/index.php/OWASP_Spring_Of_Code_2007_Applications#EdFinkler_-_A_comprehensive_input_retrieval.2Ffiltering_system_for_PHP">SpoC007 project</a>. I believe it is ready for "real-world" use.
</blockquote>
<p>
Along with the new code being released there's also <a href="http://funkatron.com/inspekt/user_docs">more documentation</a>, <a href="http://funkatron.com/inspekt/api_docs/">API docs</a>, a <a href="http://pear.funkatron.com/">PEAR channel</a> and a <a href="http://groups.google.com/group/inspekt">mailing list</a>.
</p>]]></description>
      <pubDate>Mon, 21 Jan 2008 14:38:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ivo Jansch's Blog: Don't use addslashes for database escapes]]></title>
      <guid>http://www.phpdeveloper.org/news/9164</guid>
      <link>http://www.phpdeveloper.org/news/9164</link>
      <description><![CDATA[<p>
<i>Ivo Jansch</i> has <a href="http://www.jansch.nl/2007/11/30/dont-use-addslashes-for-database-escapes/">a reminder</a> for developers when they're putting user data into their databases - don't use addslashes.
</p>
<blockquote>
[Addslashes] is not the best way to escape data. The most important reason is security. addslashes can lure you into a false sense of security. As <a href="http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string">Chris Shiflett</a> points out, there are situations that addslashes doesn't escape. Use <a href="http://www.php.net/manual/en/function.mysql-real-escape-string.php">mysql_real_escape_string</a> instead.
</blockquote>
<p>
<i>Ivo</i> also <a href="http://www.jansch.nl/2007/11/30/dont-use-addslashes-for-database-escapes/">talks about</a> the advantages of using the right function and suggests another even more secure way too - <a href="http://www.php.net/pdo">PDO</a>.
</p>]]></description>
      <pubDate>Mon, 03 Dec 2007 15:27:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Girouard's Blog: FIEO with PHP 5 Interceptors]]></title>
      <guid>http://www.phpdeveloper.org/news/9001</guid>
      <link>http://www.phpdeveloper.org/news/9001</link>
      <description><![CDATA[<p>
<i>Michael Girouard</i> has a <a href="http://www.lovemikeg.com/blog/2007/10/30/feio-with-php-5-interceptors/">post on his blog</a> about something that's becoming more and more wide-spread in the PHP community (thankfully) - filtering input from users and escaping the output to ensure the safety of your application.
</p>
<blockquote>
The idea itself is simple. When data comes into your application, it must be filtered prior to it actually being used for any reason. This means all data. Form values, URL values, and yes, even the values in the forever useful $_SERVER superglobal. [...] Before leaving your application, data should be properly escaped with the specific output medium in mind. 
</blockquote>
<p>
<a href="http://www.lovemikeg.com/blog/2007/10/23/the-abstract-collection/">Previously</a> he showed how, using an interceptor method in PHP5, you could build "collections of data". He uses the same sort of method here, appling custom filters to the data based on the output call. Code is included for both the filtering interface and two example filters - one for SQL and the other for HTML.
</p>
<p>
You can also <a href="http://www.lovemikeg.com/downloads/DataFilter.php.txt">grab the code</a> if you just want to play with that.
</p>]]></description>
      <pubDate>Thu, 08 Nov 2007 08:41:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gareth Heyes' Blog: Regular expression challenge]]></title>
      <guid>http://www.phpdeveloper.org/news/8873</guid>
      <link>http://www.phpdeveloper.org/news/8873</link>
      <description><![CDATA[<p>
<i>Gareth Heyes</i> has posted <a href="http://www.thespanner.co.uk/2007/10/18/regular-expression-challenge/">another challenge</a> to his blog - this time it involves using a regular expression to convert the inputted string into the output he's given.
</p>
<blockquote>
After the success of my "<a href="http://www.thespanner.co.uk/2007/10/10/a-bit-of-fun/">a bit of fun</a>" challenge, a few people asked for some more challenges. So I was answering a question on a mailing list that I'm a member of and I thought it would be a good topic for a little challenge and help sharpen everyone's regular expression skills.
</blockquote>
<p>
This time, his <a href="http://www.thespanner.co.uk/2007/10/18/regular-expression-challenge/">challenge</a> involves taking the input, rail start/end locations from an array and, via the PHP script given (no regular expression in it, of course) make the output, a sort of JSON formatted message. It's already been answered, but if you want to, try it yourself first then read the answer below the post.
</p>]]></description>
      <pubDate>Fri, 19 Oct 2007 14:48:00 -0500</pubDate>
    </item>
  </channel>
</rss>
