<?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>Penguinsoft</title>
	<atom:link href="http://penguinsoft.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://penguinsoft.us</link>
	<description>Application Development, Web Development, Innovative Software Solutions</description>
	<lastBuildDate>Fri, 06 Aug 2010 05:19:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>TheNFFL Website</title>
		<link>http://penguinsoft.us/2010/08/thenffl-com-national-finger-football-league/</link>
		<comments>http://penguinsoft.us/2010/08/thenffl-com-national-finger-football-league/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 02:20:23 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=564</guid>
		<description><![CDATA[Penguinsoft had an opportunity to work with Zelo Sport and NFFL to create this site. To find out more about the game and the league, please visit the site.]]></description>
			<content:encoded><![CDATA[<p><a href="http://penguinsoft.us/wp-content/uploads/thenffl_screenshot2.jpg"><img src="http://penguinsoft.us/wp-content/uploads/thenffl_screenshot2.jpg" alt="" width="300" height="200" /></a><a href="http://penguinsoft.us/wp-content/uploads/thenffl_screenshot.jpg"> <img src="http://penguinsoft.us/wp-content/uploads/thenffl_screenshot.jpg" alt="" width="300" height="200" /></a></p>
<p>Penguinsoft had an opportunity to work with <a href="http://zelosport.com" target="_blank">Zelo Sport</a> and NFFL to create this site.</p>
<p>To find out more about the game and the league, please visit <a href="http://thenffl.com" target="_self">the site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/08/thenffl-com-national-finger-football-league/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Class for PHP</title>
		<link>http://penguinsoft.us/2010/08/mysql-class-for-php/</link>
		<comments>http://penguinsoft.us/2010/08/mysql-class-for-php/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 01:57:50 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Code and Servers]]></category>
		<category><![CDATA[Awesomeness]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=553</guid>
		<description><![CDATA[This should get you started if you're looking to connect to MySQL database.]]></description>
			<content:encoded><![CDATA[<p>This should get you started if you&#8217;re looking to connect to MySQL database.<span id="more-553"></span></p>
<p>Requires a simple configuration file where you keep all your variables (user/password/etc, like SITEDB_HOSTNAME).</p>
<p>To connect, just drop these lines in the code</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mysqlClass.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> mysqlClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mystuff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStuff</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><strong>mysqlClass source:</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> mysqlClass <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$_Link</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Construct: Open SQL</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_Link <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span>SITEDB_HOSTNAME<span style="color: #339933;">,</span> SITEDB_USERNAME<span style="color: #339933;">,</span> SITEDB_PASSWORD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SET NAMES 'utf8'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span>SITEDB_DATABASE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_Link<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">callError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Server connection error: &quot;</span> <span style="color: #339933;">.</span> SITEDB_HOSTNAME <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$db</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">callError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Database open error: &quot;</span> <span style="color: #339933;">.</span> SITEDB_DATABASE <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Destruct: Close SQL</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __destruct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_Link<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Update sample</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> updateStuff<span style="color: #009900;">&#40;</span><span style="color: #000088;">$stuff</span><span style="color: #339933;">,</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;
			UPDATE 		stuff
			SET		stuff = '<span style="color: #009933; font-weight: bold;">%s</span>'
			WHERE		id = <span style="color: #009933; font-weight: bold;">%d</span>
		&quot;</span><span style="color: #339933;">,</span>
			<span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stuff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_Link<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">callError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Update Error: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Insert Sample</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> insertStuff<span style="color: #009900;">&#40;</span><span style="color: #000088;">$stuff</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;
			INSERT INTO		stuff
						(stuff)
				VALUES		('<span style="color: #009933; font-weight: bold;">%s</span>');
		&quot;</span><span style="color: #339933;">,</span>
			<span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stuff</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span> or <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">callError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Insert Error&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #990000;">mysql_insert_id</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Select Sample</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getStuff<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;
                    SELECT          *
                    FROM            stuff
		&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_Link<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">callError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Result error: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$queryresult</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$queryresult</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #990000;">mysql_free_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$queryresult</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Show SQL errors</span>
	<span style="color: #000000; font-weight: bold;">function</span> callError<span style="color: #009900;">&#40;</span><span style="color: #000088;">$details</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Database Error: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$details</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' Error: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/08/mysql-class-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Penguin Project &#8211; Coming September 1, 2010</title>
		<link>http://penguinsoft.us/2010/07/penguin-project-coming-september-1-2010/</link>
		<comments>http://penguinsoft.us/2010/07/penguin-project-coming-september-1-2010/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 14:29:14 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=535</guid>
		<description><![CDATA[Streamlined projects Improved communication Increased productivity Detailed Reports]]></description>
			<content:encoded><![CDATA[<ul>
<li>Streamlined projects</li>
<li>Improved communication</li>
<li>Increased productivity</li>
<li>Detailed Reports</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/penguin-project-coming-september-1-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>That&#8217;s amazing.. Penguin!</title>
		<link>http://penguinsoft.us/2010/07/thats-amazing-penguin/</link>
		<comments>http://penguinsoft.us/2010/07/thats-amazing-penguin/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 02:32:35 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=437</guid>
		<description><![CDATA[We&#8217;re working overtime to bring you so many spectacular things I don&#8217;t know where to start. Right now busy at work &#8211; doing this website. Please give us feedback!]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re working overtime to bring you so many spectacular things I don&#8217;t know where to start.</p>
<p>Right now busy at work &#8211; doing this website. Please give us feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/thats-amazing-penguin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check out our blog!</title>
		<link>http://penguinsoft.us/2010/07/check-out-our-blog/</link>
		<comments>http://penguinsoft.us/2010/07/check-out-our-blog/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 02:26:12 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=516</guid>
		<description><![CDATA[Check out our blog!]]></description>
			<content:encoded><![CDATA[<p>Check out our blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/check-out-our-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show Errors in PHP</title>
		<link>http://penguinsoft.us/2010/07/show-errors-in-php/</link>
		<comments>http://penguinsoft.us/2010/07/show-errors-in-php/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 03:39:57 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Code and Servers]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=486</guid>
		<description><![CDATA[In the good &#8220;old&#8221; days when 99% of all websites looked horrible, PHP would by default spit out all errors. If you made a mistake in your code, you&#8217;d get gracefully &#8220;notified&#8221;. With PHP 5 we arrived to a new era of hidden rebukes &#8211; page just loads totally blank by default. If you like [...]]]></description>
			<content:encoded><![CDATA[<p>In the good &#8220;old&#8221; days when 99% of all websites looked horrible, PHP would by default spit out all errors. If you made a mistake in your code, you&#8217;d get gracefully &#8220;notified&#8221;.</p>
<p>With PHP 5 we arrived to a new era of hidden rebukes &#8211; page just loads totally blank by default.</p>
<p>If you like games, you can just start searching the problem from your source code! If you have less than 100k lines you&#8217;ve got a good chance to find the issue before dawn.</p>
<p>If not, just drop these lines to the beginning of the script &#8211; should be fine&#8230;</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">E_ALL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/show-errors-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad SSH Logins</title>
		<link>http://penguinsoft.us/2010/07/bad-ssh-logins/</link>
		<comments>http://penguinsoft.us/2010/07/bad-ssh-logins/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 02:33:00 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[Code and Servers]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bad]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[mc]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=403</guid>
		<description><![CDATA[On a linux machine all the failed ssh logins go to a log file in /var/log/btmp. So the question being, How do we see this information in a nice understandable format. We could just use the cat utility like so <code>cat /var/log/btmp</code>. After 10 minutes]]></description>
			<content:encoded><![CDATA[<p>On a linux machine all the failed ssh logins go to a log file <span id="more-403"></span>in /var/log/btmp. So the question being, How do we see this information in a nice understandable format. We could just use the cat utility like so <code>cat /var/log/btmp</code>. After 10 minutes of your linux box spewing out a bunch of junk to your terminal you&#8217;ll understand why this is a bad thing. There is a utility called <code>last</code> it is used to see the people who were last logged in. Type <code>last -10</code>. The output is useful but it isn&#8217;t useful for our purposes. We want to see the bad logins not the good logins. It just so happens the <code>last</code> utility accepts a filename parameter. Type <code>last -10 -f /var/log/btmp</code>. Voila! This is exactly what we want to see. You can change the -10 to any number you want and it will show you that number of bad logins. Let&#8217;s put this into an alias in our bash profile. You need to navigate to your bash profile, mine is in /root/.bash_profile. Use a text editor like <code>vi</code> or my favorite <code>mc</code>. Add the following line to the script <code>alias bad='last -10 -f /var/log/btmp</code>. Save it, log out and log back in. Now you can just type <code>bad</code> and it will output what you want! Please leave a comment if this helped you, or if you have a better way of doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/bad-ssh-logins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bible Module</title>
		<link>http://penguinsoft.us/2010/06/bible-module-for-thedesperate-com/</link>
		<comments>http://penguinsoft.us/2010/06/bible-module-for-thedesperate-com/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 13:44:00 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Project Updates]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=337</guid>
		<description><![CDATA[Just finished a new module for TheD &#8211; Bible Module. This fancy feature allows visitors and users of TheDesperate.com to browse and search the King James Version (KJV) of the Bible. We&#8217;ve got some awesome added features planned, so this is just the beginning. Leave comments and let us know what you think: TheDesperate.com/bible]]></description>
			<content:encoded><![CDATA[<p>Just finished a new module for TheD &#8211; Bible Module. <span id="more-337"></span>This fancy feature allows visitors and users of TheDesperate.com to browse and search the King James Version (KJV) of the Bible. We&#8217;ve got some awesome added features planned, so this is just the beginning.</p>
<p>Leave comments and let us know what you think:</p>
<p><a href="http://TheDesperate.com/bible">TheDesperate.com/bible</a></p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/06/bible-module-for-thedesperate-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sanitizing Input in Flash</title>
		<link>http://penguinsoft.us/2010/06/sanitizing-input-in-flash/</link>
		<comments>http://penguinsoft.us/2010/06/sanitizing-input-in-flash/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 00:17:38 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[Code and Servers]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bbs]]></category>
		<category><![CDATA[characters]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[sanitizing]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=252</guid>
		<description><![CDATA[Let&#8217;s say for example you are creating a bulletin board system or some post system from within flash and you would like to restrict the use of any html or special characters. It turns out there is a very simple and elegant way you can strip out or replace any characters you want to. First [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say for example you are creating a bulletin board system or some post system from within flash and you would like to restrict the use of any html or special characters. <span id="more-252"></span>It turns out there is a very simple and elegant way you can strip out or replace any characters you want to.</p>
<p>First we want to declare an array in as3 with all the characters that we don&#8217;t want in our string.</p>
<div class="wp_syntax">
<div class="code">
<pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> htmlChars:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
htmlChars<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
htmlChars<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
htmlChars<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;&amp;gt;&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
htmlChars<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;&amp;lt;&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;&quot;</span>;</pre>
</div>
</div>
<p>Then all we have to do is to create our function that takes a string as an argument and returns our safe sanitized string.</p>
<div class="wp_syntax">
<div class="code">
<pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> sanitizeInput<span style="color: #66cc66;">&#40;</span>msg:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> htmlChar:<span style="color: #0066CC;">Object</span> <span style="color: #b1b100;">in</span> htmlChars<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
    	     msg = msg.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span>htmlChar<span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span>htmlChars<span style="color: #66cc66;">&#91;</span>htmlChar<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> msg;
<span style="color: #66cc66;">&#125;</span></pre>
</div>
</div>
<p>Now we can call our function.</p>
<div class="wp_syntax">
<div class="code">
<pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> safeString:<span style="color: #0066CC;">String</span> = sanitizeInput<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;</span></pre>
</div>
</div>
<p>What we can also do is to replace characters in the string. For example&#8230;</p>
<div class="wp_syntax">
<div class="code">
<pre class="actionscript" style="font-family:monospace;">htmlChars<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;Bye&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;CYA&quot;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> safeString:<span style="color: #0066CC;">String</span> = sanitizeInput<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Bye for now<span style="color: #000099; font-weight: bold;">\&quot;</span>);
// safeString = &quot;</span>CYA <span style="color: #b1b100;">for</span> now<span style="color: #ff0000;">&quot;</span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/06/sanitizing-input-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decorative Photo Art Website Launched</title>
		<link>http://penguinsoft.us/2010/06/decorative-photo-art-website-launched/</link>
		<comments>http://penguinsoft.us/2010/06/decorative-photo-art-website-launched/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 16:55:54 +0000</pubDate>
		<dc:creator>Tomi Lehto</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Project Updates]]></category>
		<category><![CDATA[Design Styles]]></category>
		<category><![CDATA[Photo Art]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=243</guid>
		<description><![CDATA[Photo art by theme with option to purchase. Check out the site and the photos! Click away to the photo land.]]></description>
			<content:encoded><![CDATA[<p>Photo art by theme with option to purchase. Check out the site and the photos!<span id="more-243"></span></p>
<p><a href="http://tomilehto.com" target="_blank">Click away</a> to the photo land.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/06/decorative-photo-art-website-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
