<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Winn.ws</title>
	<atom:link href="http://winn.ws/feed" rel="self" type="application/rss+xml" />
	<link>http://winn.ws</link>
	<description>Standards-based design &#38; development</description>
	<lastBuildDate>Sat, 28 Aug 2010 07:22:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP/MySQL after 2010-005</title>
		<link>http://winn.ws/archives/492</link>
		<comments>http://winn.ws/archives/492#comments</comments>
		<pubDate>Sat, 28 Aug 2010 07:22:27 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=492</guid>
		<description><![CDATA[After applying Security Update 2010-05, some users have reported PHP and MySQL problems, including an inability to connect to MySQL databases. Apple reports that the following procedure resolves the database connection issue:

In the Terminal type sudo nano /etc/php.ini (Terminal will ask you for your password)
Change: mysql.default_socket = to: mysql.default_socket = /tmp/mysql.sock
Press Ctrl-O, then Enter to [...]]]></description>
			<content:encoded><![CDATA[<p>After applying Security Update 2010-05, some users have reported PHP and MySQL problems, including an inability to connect to MySQL databases. Apple reports that the following procedure resolves the database connection issue:</p>
<ol>
<li>In the Terminal type sudo nano /etc/php.ini (Terminal will ask you for your password)</li>
<li>Change: mysql.default_socket = to: mysql.default_socket = /tmp/mysql.sock</li>
<li>Press Ctrl-O, then Enter to save</li>
<li>Type sudo apachectl graceful</li>
</ol>
<p>Note that you may need to duplicate the original install php.ini.default file, just simply copy the contents of the file and create a php.ini. (cp php.ini.default php.ini)</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/492/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpArmory for WoW</title>
		<link>http://winn.ws/archives/484</link>
		<comments>http://winn.ws/archives/484#comments</comments>
		<pubDate>Mon, 23 Aug 2010 02:17:51 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[World of Warcraft]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=484</guid>
		<description><![CDATA[phpArmory is a PHP class library. It allows php software developers to easily access data from the World of Warcraft Armory website. This is useful because the Armory website contains up-to-date and official details on characters, guilds, and items in World of Warcraft.]]></description>
			<content:encoded><![CDATA[<p>phpArmory is a PHP class library. It allows php software developers to easily access data from the World of Warcraft Armory website. This is useful because the Armory website contains up-to-date and official details on characters, guilds, and items in World of Warcraft.</p>
<p> I discovered this simple library about 4 days ago and have been reviewing it. I came to a conclusion to use it after about 3 hours of playing with it! I was able to pull back all the information i needed to complete my new application and add-on to Wordboxes. Below i will cover a few samples of what this class will do.</p>
<h3>Character</h3>
<p> The first thing i did was try to pul my character information back. This was simple and done quickly with just a few minor calls. Once i got the multi level array back (when i say multi level I am talking about 4 to 5 levels deep) i was able to sift through it by using print_r() and a pre tag.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// First include the phpArmory class</span>
<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'classes/phpArmory.class.php'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> phpArmory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Character lookup</span>
<span style="color: #000088;">$character</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">characterFetch</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Realm'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$character</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p> Now, I wanted to take this a bit farther and list my characters gear with the image and item level. Below is a foreach loop, looping through the ‘item’ array. You may also notice i am 4 levels deep in the array at this point, i figured that out by just looking at the above code output. As i am looping through the ‘item’ array i will also have to step one level deeper into the ‘attributes’ array so i can see the information on the gear. </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$character</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'characterinfo'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'charactertab'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'items'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'item'</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt;&lt;img class=&quot;gearicon&quot; src=&quot;http://www.wowarmory.com/wow-icons/_images/64x64/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'icon'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.jpg&quot; alt=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' (ilvl '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'level'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">')&lt;/p&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>The above will output:</h3>
<p style="text-align:center;"><a class="colorbox" href="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/08/wowarmoryphp.jpg"><img src="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/08/wowarmoryphp-182x300.jpg" alt="" title="wowarmoryphp" width="182" height="300" class="aligncenter size-medium wp-image-485" /></a></p>
<h3>Items</h3>
<p>Another great thing about this library is that you are able to pull back just single items based on ID. This is great because after pulling back character info you also get gear ID&#8217;s. Then you can use the gear ID&#8217;s to get more information on that single item. This also makes it handy for tool tips as you will see on may wow sites.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Item lookup</span>
<span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">itemFetch</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">41922</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The above will be a large multi level array with that item information.</p>
<h3>Other stuff</h3>
<p>There are other things you can use this library for such as Guild lookups and PVP team lookups.</p>
<p>Download the <a href='http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/08/phpArmory.class.php_.zip'>phpArmory.class.php</a> and start building a web based wow app! Full documentation and support at <a href="http://phparmory.sourceforge.net/">http://phparmory.sourceforge.net/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/484/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Investment in Open Source is up!</title>
		<link>http://winn.ws/archives/475</link>
		<comments>http://winn.ws/archives/475#comments</comments>
		<pubDate>Thu, 19 Aug 2010 20:02:23 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=475</guid>
		<description><![CDATA[This year could be of critical importance to the open source software industry, with a recent survey showing a majority of businesses and organizations in the U.S. and United Kingdom expecting to increase investment in it this year.]]></description>
			<content:encoded><![CDATA[<p>This year could be of critical importance to the open source software industry, with a recent survey showing a majority of businesses and organizations in the U.S. and United Kingdom expecting to increase investment in it this year.</p>
<p>A survey by <a href="http://newsroom.accenture.com/article_display.cfm?article_id=5045">Accenture</a> also showed that nearly 40 percent of those queried also planned to migrate critical operations to open source systems in the next 12 months.<a class="colorbox" href="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/08/accenture-open-source.jpeg"><img src="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/08/accenture-open-source-300x225.jpg" alt="" title="accenture-open-source" width="300" height="225" class="alignright size-medium wp-image-477" style="float:right; margin:8px;" /></a></p>
<p>About half the 300 organizations &#8211; in both the public and private sectors &#8211; already are using or have committed to using open source software and about a third are experimenting with OSS. Fully 88 percent of those that already are using OSS in their operations plan to increase their investment.</p>
<p>What may be the key finding in the survey, however, is the reasons behind the move toward open source: Quality.</p>
<p>Firms in the U.K. were more positive about the quality. When asked which aspects of OSS were very or quite important in their decision to go with the open source solutions,  86 percent of the UK organizations surveyed said open source provided better quality software than proprietary systems, and just 49 percent pointed to the lower total cost of ownership. In the U.S., those figures were 66 percent and 65 percent, respectively.</p>
<p>When it came to the disadvantages of open source, those in the U.S. were far more likely to cite the lack of &#8220;true standards&#8221; (42 percent) or &#8220;development control&#8221; (29 percent), while those in the U.K. were focused overwhelmingly on training and education in how to use open source (41 percent), though the standards also were an issue (29 percent). Interestingly, no one in the U.S. cited training and education as an issue.</p>
<p>But in the U.S., companies were far more likely to expect their investment to increase than in the U.K. — 82 percent versus 56 percent.</p>
<p>From <a href="http://www.networkworld.com">Net Workworld</a></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/475/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wave goodbye</title>
		<link>http://winn.ws/archives/473</link>
		<comments>http://winn.ws/archives/473#comments</comments>
		<pubDate>Wed, 04 Aug 2010 21:34:34 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Design & Layout]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Wave]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=473</guid>
		<description><![CDATA[From the official <a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html">Google blog</a>. They announced today that they will no longer be supporting Google Wave by the end of the year.]]></description>
			<content:encoded><![CDATA[<p>From the official <a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html">Google blog</a>. They announced today that they will no longer be supporting Google Wave by the end of the year.</p>
<blockquote><p>But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked. We don’t plan to continue developing Wave as a standalone product, but we will maintain the site at least through the end of the year and extend the technology for use in other Google projects. The central parts of the code, as well as the protocols that have driven many of Wave’s innovations, like drag-and-drop and character-by-character live typing, are already available as open source, so customers and partners can continue the innovation we began. In addition, we will work on tools so that users can easily “liberate” their content from Wave.</p></blockquote>
<p><small><a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html">From the official Google blog.</a></small></p>
<p>I for one am a huge Google Wave fan and hate to see this go. Why Google? Why!?</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/473/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.3 Backwards incompatible change</title>
		<link>http://winn.ws/archives/470</link>
		<comments>http://winn.ws/archives/470#comments</comments>
		<pubDate>Wed, 04 Aug 2010 16:00:36 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=470</guid>
		<description><![CDATA[Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn&#8217;t affect non-namespaced classes.

namespace Foo;
class Bar &#123;
    public function Bar&#40;&#41; &#123;
        // treated as constructor in PHP 5.3.0-5.3.2
     [...]]]></description>
			<content:encoded><![CDATA[<p>Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn&#8217;t affect non-namespaced classes.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Foo<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">class</span> Bar <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Bar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// treated as constructor in PHP 5.3.0-5.3.2</span>
        <span style="color: #666666; font-style: italic;">// treated as regular method in PHP 5.3.3</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Update from <a href="http://php.net">PHP.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/470/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>var_export in PHP 5</title>
		<link>http://winn.ws/archives/468</link>
		<comments>http://winn.ws/archives/468#comments</comments>
		<pubDate>Wed, 04 Aug 2010 05:05:33 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=468</guid>
		<description><![CDATA[So var_export(mixed $expression [, bool $return = false ] ) outputs or returns a parsable string representation of a variable.]]></description>
			<content:encoded><![CDATA[<p>So var_export(mixed $expression [, bool $return = false ] ) outputs or returns a parsable string representation of a variable, it gets structured information about the given variable. It is similar to var_dump() with one exception: the returned representation is valid PHP code.</p>
<p>It&#8217;s quite simple to use, below is an example of how to use it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> A <span style="color: #009900;">&#123;</span> 
     <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> A<span style="color: #339933;">;</span>
<span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">var</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_export</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The output from the above code would be&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">A<span style="color: #339933;">::</span>__set_state<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
   <span style="color: #0000ff;">'var'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>Note:</strong> var_export() does not handle circular references as it would be close to impossible to generate parsable PHP code for that. If you want to do something with the full representation of an array or object, use serialize(). </p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/468/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenStack</title>
		<link>http://winn.ws/archives/462</link>
		<comments>http://winn.ws/archives/462#comments</comments>
		<pubDate>Mon, 19 Jul 2010 17:36:51 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Platforms]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=462</guid>
		<description><![CDATA[Today is a big day for Rackspace Hosting. They announced a new project that Rackspace believes will change the way the cloud is developed and it's called <a href="http://www.openstack.org/">OpenStack – an open source cloud platform</a> designed to foster the emergence of technology standards and cloud interoperability.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rackspacecloud.com/957-0-1-20.html" target="_blank"><img style="float:left; margin:0 5px 5px 0;" border="0" src="http://affiliates.rackspacecloud.com/banners/Powered_the-rackspace-cloud-250-wide.png" width="250" height="69" alt="Powered by Rackspace Cloud Computing"></a>Today is a big day for Rackspace Hosting. They announced a new project that Rackspace believes will change the way the cloud is developed and it&#8217;s called <a href="http://www.openstack.org/">OpenStack – an open source cloud platform</a> designed to foster the emergence of technology standards and cloud interoperability. In short, Rackspace will be opening code on our cloud infrastructure for public use.</p>
<p>The initial components being released through this project include the code that powers our <a href="http://www.rackspacecloud.com/957-0-3-13.html">Cloud Files</a> (available today) and <a href="http://www.rackspacecloud.com/957-0-3-13.html">Cloud Servers</a> (expected available late 2010). This project will also incorporate technology provided by other open-source projects. We expect to be joined by leaders in the technology industry and others to drive a deployable totally open cloud solution through this project.</p>
<p>Why is Rackspace doing this? Historically, most cloud offerings have been built on proprietary or closed platforms that create lock-in and make migration difficult. With OpenStack, any interested party – including our peers, Solution Partners and customers – will be able to collaborate with us to author, improve and expand OpenStack technologies.</p>
<h5>Overview</h5>
<ul>
<li><strong>What the software does:</strong> The goal of OpenStack is to allow any organization to create and offer cloud computing capabilities using open source software running on standard hardware. OpenStack Compute is software for automatically creating and managing large groups of virtual private servers. OpenStack Storage is software for creating redundant, scalable object storage using clusters of commodity servers to store terabytes or even petabytes of data.</li>
<li><strong>Who it&#8217;s for:</strong> Institutions and service providers with physical hardware that they&#8217;d like to use for large-scale cloud deployments. (Additionally, companies who have specific requirements that prevent them from running in a public cloud.)</li>
</ul>
<p>View it all at <a href="http://www.openstack.org/">OpenStack&#8230;</a></p>
<p style="text-align:center;"><a href="http://www.rackspacecloud.com/957-0-1-30.html" target="_blank"><img border="0" src="http://affiliates.rackspacecloud.com/banners/linux-468x60.png" width="468" height="60" alt="Linux Servers on the Cloud IN MINUTES"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/462/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Filtering</title>
		<link>http://winn.ws/archives/459</link>
		<comments>http://winn.ws/archives/459#comments</comments>
		<pubDate>Mon, 19 Jul 2010 14:57:18 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=459</guid>
		<description><![CDATA[Time to leave $_GET and $_POST in the dust! In fact, you probably shouldn’t use $_GET and $_POST anymore. Since PHP 5.2, there is a new and better way to safely retrieve user-submitted data.]]></description>
			<content:encoded><![CDATA[<p>Time to leave $_GET and $_POST in the dust! In fact, you probably shouldn’t use $_GET and $_POST anymore. Since PHP 5.2, there is a new and better way to safely retrieve user-submitted data.</p>
<p>How many times have we heard about security issues in PHP applications stemming from unescaped GET and POST parameters? Proper escaping of input is a perennial problem with web development in general.</p>
<blockquote><p>On the database side, many worries over SQL injection have been squelched. The clever developers of PDO have constructed a library that analyzes data and escapes it appropriately. The problem of validating and sanitizing input is still a substantial issue on the front-end. Many PHP developers still spend time on development cycles building custom code to filter input or use a framework just for the validation helpers.</p></blockquote>
<p>PHP (5.2 onward) has a built-in filtering system that makes the tasks of validating and sanitizing data easy. Rather than accessing the $_GET and $_POST superglobals directly, you can make use of PHP functions like filter_input() and filter_input_array().</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$theGetVar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">filter_input</span><span style="color: #009900;">&#40;</span>INPUT_GET<span style="color: #339933;">,</span> ‘someGetVar’<span style="color: #339933;">,</span> FILTER_SANITIZE_STRING<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Same as doing the below and running it through a validator</span>
<span style="color: #000088;">$theGetVar</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'someGetVar'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Using post is also as easy, just change &#8220;INPUT_GET&#8221; to &#8220;INPUT_POST&#8221;</p>
<p>Are you sick of writing your own regex for validating an email address, url or even an IP?</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Email</span>
<span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> <span style="color: #990000;">filter_input</span><span style="color: #009900;">&#40;</span>INPUT_GET<span style="color: #339933;">,</span> ‘Email’<span style="color: #339933;">,</span> FILTER_VALIDATE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// URL</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #990000;">filter_input</span><span style="color: #009900;">&#40;</span>INPUT_GET<span style="color: #339933;">,</span> ‘URL’<span style="color: #339933;">,</span> FILTER_VALIDATE_URL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// IP</span>
<span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #990000;">filter_input</span><span style="color: #009900;">&#40;</span>INPUT_GET<span style="color: #339933;">,</span> ‘URL’<span style="color: #339933;">,</span> FILTER_VALIDATE_IP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You can use multiple filters on one input:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> <span style="color: #990000;">filter_input</span><span style="color: #009900;">&#40;</span>INPUT_GET<span style="color: #339933;">,</span> ‘Email’<span style="color: #339933;">,</span> FILTER_VALIDATE_EMAIL<span style="color: #339933;">|</span> FILTER_SANITIZE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Filters won’t solve every security-related problem, but it&#8217;s a great step in the right direction when it comes to writing safe code. Below are the php.net docs:</p>
<ul>
<li><a href="http://www.php.net/manual/en/book.filter.php">Data Filtering</a></li>
<li><a href="http://us2.php.net/manual/en/function.filter-input.php">filter_input</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/459/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paulette Greene</title>
		<link>http://winn.ws/archives/454</link>
		<comments>http://winn.ws/archives/454#comments</comments>
		<pubDate>Sat, 17 Jul 2010 04:27:35 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Design & Layout]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Mail Chimp]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=454</guid>
		<description><![CDATA[One of the latest project i have done for <a href="http://scottcoleinteractive.com/">SCI</a> is for a client named Paulette Greene. They are a large realtor shop here in the DFW (Dallas/Fort Worth) area.]]></description>
			<content:encoded><![CDATA[<p>One of the latest project i have done for <a href="http://scottcoleinteractive.com/">SCI</a> is for a client named Paulette Greene. They are a large realtor shop here in the DFW (Dallas/Fort Worth) area. The site was not built on any CMS per customer request but did have an integration with Mail Chimp for a newsletter.</p>
<p style="text-align:center;"><a class="colorbox" href="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/07/pg_large.jpg"><img src="http://dhbbuddo7esu2.cloudfront.net/wp-content/uploads/2010/07/pg_small.jpg" alt="" title="pg_small" width="560" height="100" class="alignnone size-full wp-image-456" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/454/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cluster Compute Instances for EC2</title>
		<link>http://winn.ws/archives/450</link>
		<comments>http://winn.ws/archives/450#comments</comments>
		<pubDate>Tue, 13 Jul 2010 15:25:48 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Platforms]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[AWS]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=450</guid>
		<description><![CDATA[Amazon is excited to announce the immediate availability of Cluster Compute Instances for Amazon EC2, a new instance type specifically designed for high-performance computing (HPC) applications and other demanding network-bound applications. Customers with complex computational workloads such as tightly coupled parallel processes, or with applications sensitive to network performance, can now achieve the same high [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon is excited to announce the immediate availability of Cluster Compute Instances for Amazon EC2, a new instance type specifically designed for high-performance computing (HPC) applications and other demanding network-bound applications. Customers with complex computational workloads such as tightly coupled parallel processes, or with applications sensitive to network performance, can now achieve the same high compute and network performance provided by custom-built infrastructure while benefiting from the elasticity, flexibility and cost advantages of Amazon EC2.</p>
<p>Prior to Cluster Compute Instances for Amazon EC2, organizations with advanced HPC needs have been required to fund expensive, in-house compute clusters by purchasing dedicated, purpose-built hardware. As a result, the demand for high-performance cluster computing often exceeds the capacity of many organizations, and many projects are cut altogether or wait in long queues to access shared resources. With Cluster Compute Instances, businesses and researchers now have access to the high-performance computing capabilities they need with pay-as-you-go pricing, the ability to scale on-demand, and no upfront investments.</p>
<p>Cluster Compute Instances provide similar functionality to other Amazon EC2 instances but have been specifically engineered to provide high-performance compute and network capability. Cluster Compute Instances provide more CPU than any other Amazon EC2 instance. Customers can also group Cluster Compute Instances into clusters allowing applications to get the low-latency network performance required for tightly coupled, node-to-node communication (typical of many HPC applications). Cluster Compute Instances also provide significantly increased network throughput making them well suited for customer applications that need to perform network-intensive operations. Depending on usage patterns, applications can see up to 10 times the network throughput of the largest current Amazon EC2 instance types.</p>
<p>Learn more about the new Cluster Compute instances for Amazon EC2 at <a href="aws.amazon.com/ec2">aws.amazon.com/ec2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/450/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 5/10 queries in 0.004 seconds using memcached
Content Delivery Network via Amazon Web Services: CloudFront: dhbbuddo7esu2.cloudfront.net

Served from: winn.ws @ 2010-09-08 23:28:57 -->