<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/wordpress-mu-1.2.1" -->
<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/"
	>

<channel>
	<title>PHP/MySQL made simple</title>
	<link>http://itknowledgeexchange.techtarget.com/php-mysql</link>
	<description></description>
	<pubDate>Mon, 14 Apr 2008 16:23:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.1</generator>
	<language>en</language>
			<item>
		<title>Intelligent Password Generator (Part I)</title>
		<link>http://itknowledgeexchange.techtarget.com/php-mysql/intelligent-password-generator-part-i/</link>
		<comments>http://itknowledgeexchange.techtarget.com/php-mysql/intelligent-password-generator-part-i/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 16:23:04 +0000</pubDate>
		<dc:creator>Jon Harris</dc:creator>
		
		<category><![CDATA[Web development]]></category>

		<category><![CDATA[PHP/MySQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/php-mysql/intelligent-password-generator-part-i/</guid>
		<description><![CDATA[Outline
Everybody and their brother(or sister, as the case may be) has their own &#8220;random password generator&#8221;.  I&#8217;ve used them, and to be honest, I&#8217;ve never been impressed. You wind up with these passwords that are impossible to remember with combinations that just don&#8217;t &#8220;flow&#8221; when you attempt to type them.  I got to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Outline</strong><br />
Everybody and their brother(or sister, as the case may be) has their own &#8220;random password generator&#8221;.  I&#8217;ve used them, and to be honest, I&#8217;ve never been impressed. You wind up with these passwords that are impossible to remember with combinations that just don&#8217;t &#8220;flow&#8221; when you attempt to type them.  I got to thinking about all the times that I&#8217;ve helped others figure out a good password. One that would meet our requirements *and* be easy to remember. This is an example of how it works:</p>
<p>&#8220;Yes, Mr. Doe, your email account was compromised, so we had to disable your account. When you&#8217;re ready to change your password, please give us a call at XXX-XXX-XXXX).&#8221;</p>
<p>&#8220;I&#8217;m ready to change it now, but I don&#8217;t know what to change it to. Could you help me pick a password?&#8221;</p>
<p>&#8220;Sure, I&#8217;ll tell you what. Think of your first pets name. Think of the day you were married, or had your first kid, and then think of another meaningful person or event, and change one letter to a symbol&#8230;.&#8221;</p>
<p>&#8220;Ok, I got it, it&#8217;s Dog1935f@ther. That&#8217;s easy to remember!&#8221;</p>
<p>&#8220;Your first dogs name was &#8216;Dog&#8217;?&#8221;</p>
<p>&#8220;He was a fish&#8230;.&#8221;</p>
<p>Ok, the last part was just comedy, but you get the gist.  Only intelligent beings can make intelligent passwords, UNLESS&#8230;.</p>
<p>Never mind. You aren&#8217;t interested anyways.</p>
<p>Oh, you are? Ok. </p>
<p><strong>Basic Concept</strong></p>
<p>I needed an application that would take a few words, a couple numbers, and a date. It would need to strip out any characters that I didn&#8217;t allow in my passwords, and it needed to be able to replace characters to make the password meet the combination requirements set my my site, for security reasons.</p>
<p>Broken down, it needed to </p>
<ul>
<li>Take 3 words</li>
<li>take 1 number</li>
<li>Take 1 date, in any format</li>
</ul>
<p>Then, it needed to:</p>
<ul>
<li>Strip out any illegal characters</li>
<li>combine enough words to meet the password length requirements</li>
<li>substitute characters with similar characters until the password strength has been met</li>
<li>check the password, to verify that it meets all requirements</li>
<li>create 2 more passwords, and output to the customers screen</li>
</ul>
<p><strong>Next time:</strong><br />
I will give you a part of the code, and explain why I did it this way.<br />
I will show you some examples of what this application will output when given different input.</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/php-mysql/intelligent-password-generator-part-i/feed/</wfw:commentRss>
		</item>
		<item>
		<title>An introduction</title>
		<link>http://itknowledgeexchange.techtarget.com/php-mysql/an-introduction/</link>
		<comments>http://itknowledgeexchange.techtarget.com/php-mysql/an-introduction/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 15:25:05 +0000</pubDate>
		<dc:creator>Jon Harris</dc:creator>
		
		<category><![CDATA[PHP/MySQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/php-mysql/an-introduction/</guid>
		<description><![CDATA[Prelude
There are many sites out there that offer a good list of software to help you program PHP, as well as a good number of websites that help you out with a project by linking you to great open-source products that server a purpose.  This will not be one of those sites. This site [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Prelude</strong><br />
There are many sites out there that offer a good list of software to help you program PHP, as well as a good number of websites that help you out with a project by linking you to great open-source products that server a purpose.  This will not be one of those sites. This site will be for those of you who already have your program of choice, be it a $500.00 IDE or just notepad, but you need pointers on how to do something, and can&#8217;t find a good place to get the info.</p>
<p><strong>Background</strong><br />
I started programming in PHP because, well, I needed some money.  Since then, I have become fairly proficient in the language.  You will almost never see me write Object-Oriented (O-O) scripts, and rarely use case statements. That doesn&#8217;t mean that I don&#8217;t know how, it simply means that I prefer the style I use.  There are many ways to write a PHP program, and some are better than others. What I am going to be offering for you is the basic idea for code, and a working sample, with a good explanation on how it works, as well as why I do it that way.  Hopefully I will show you good ways to program, as well as open you up to the possibility to the fact that there <em>are</em> other ways to program other than Object oriented programming.</p>
<p><strong>Example</strong><br />
The first example I will use is a fun one. There is a site, <a href="http://99-bottles-of-beer.net">99 bottles of beer.net</a>, who&#8217;s goal is to have a repository of programming source code that when executed will generate the full song &#8220;<em>99 Bottles of Beer on the Wall</em>&#8220;.  Most people will use a class that will return the value of the bottle until you reach 0, then print the final line: </p>
<p><em>No more bottles of beer on the wall, no more bottles of beer.<br />
Go to the store and buy some more, 99 bottles of beer on the wall.</em></p>
<p>I don&#8217;t like wasting code. I&#8217;m a firm believer that programmers have more important things to do than write useless lines of code, when just a few, short lines will do.  My solution to this challenge? This:</p>
<p>*<strong>EDIT</strong>*Could not leave script in and keep rest of post looking correct. to view code, go to <a href="http://vent.jonsjava.com/beer.txt">http://vent.jonsjava.com/beer.txt</a></p>
<p>What this script does is this:</p>
<ul>
<li>sets the max number of beers ($count=99)</li>
<li>prints out each verse until it reaches zero, decreasing the number of bottles each time (&#8211;$count)</li>
<li>Once it reaches zero, it prints the final verse, then it&#8217;s done</li>
</ul>
<p>(To see the code in action, go to <a href="http://vent.jonsjava.com/beer.php">http://vent.jonsjava.com/beer.php</a></p>
<p>Do you really need a 75-line class to do this? It may not be pretty, but it&#8217;s a good proof of concept.</p>
<p><strong>In the Next Issue</strong><br />
I will be discussing how to write an intelligent password generator</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/php-mysql/an-introduction/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
