<?xml version="1.0" encoding="iso-8859-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/"
	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>CrankBerry Blog &#187; Security</title>
	<atom:link href="http://www.crankberryblog.com/tag/security/feed" rel="self" type="application/rss+xml" />
	<link>http://www.crankberryblog.com</link>
	<description>Sharing ideas on web design, development and the internet economy</description>
	<lastBuildDate>Fri, 27 Aug 2010 17:43:49 +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 password strength detector script</title>
		<link>http://www.crankberryblog.com/2010/php-password-strength-detector-script</link>
		<comments>http://www.crankberryblog.com/2010/php-password-strength-detector-script#comments</comments>
		<pubDate>Wed, 17 Feb 2010 08:23:34 +0000</pubDate>
		<dc:creator>Jerry Low</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Script]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.crankberryblog.com/?p=333</guid>
		<description><![CDATA[If you operate a user registration script on your website you may want to ensure users are protected. There are certain aspects of this you cannot control such as the user's self selected password. Here I have a script that will detect the user's password strength and base on that you could reject the password or just make notice to the user their password's strength.

<img src="http://www.crankberryblog.com/images/password-strength-detector.jpg" alt="PHP Password Strength Detector Script" />]]></description>
			<content:encoded><![CDATA[<p>If you operate a user registration script on your website you may want to ensure users are protected. There are certain aspects of this you cannot control such as the user&#039;s self selected password. Here I have a script that will detect the user&#039;s password strength and base on that you could reject the password or just make notice to the user their password&#039;s strength.</p>
<p><img src="http://www.crankberryblog.com/images/password-strength-detector.jpg" alt="PHP Password Strength Detector Script" /></p>
<p>Basically we&#039;re checking against a few things here and we give a rating to each criteria and then add up the final score to see where they rank. Here is what we&#039;ll be checking against:</p>
<ul>
<li>Length &#8211; 10 Points</li>
<li>Lower Case Characters &#8211; 20 Points</li>
<li>Upper Case Characters &#8211; 20 Points</li>
<li>Numbers &#8211; 20 Points</li>
<li>Special Characters &#8211; 30 Points</li>
</ul>
<p></p>
<p>The points are given based on how much value they may add to the password. Enough talking I present you the function:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> password_strength<span class="br0">&#40;</span><span class="re0">$password</span>, <span class="re0">$display</span> = <span class="kw2">TRUE</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Strength Scoring</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_score</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_len</span> = <span class="kw2">FALSE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_lc</span> = <span class="kw2">FALSE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_uc</span> = <span class="kw2">FALSE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_num</span> = <span class="kw2">FALSE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pass_weird</span> = <span class="kw2">FALSE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Pad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$password</span> = <span class="nu0">0</span> . <span class="re0">$password</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Check Length</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/strlen"><span class="kw3">strlen</span></a><span class="br0">&#40;</span><span class="re0">$password</span><span class="br0">&#41;</span>&gt;<span class="nu0">6</span><span class="br0">&#41;</span> <span class="re0">$pass_len</span> = <span class="kw2">TRUE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Check Lowercase Characters</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="re0">$i</span> = <span class="nu0">97</span>; <span class="re0">$i</span> &lt;=<span class="nu0">122</span>; <span class="re0">$i</span>++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>@<a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="re0">$password</span>, <a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">&#40;</span><span class="re0">$i</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$pass_lc</span> = <span class="kw2">TRUE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Check Uppercase Characters</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="re0">$i</span> = <span class="nu0">65</span>; <span class="re0">$i</span> &lt;=<span class="nu0">90</span>; <span class="re0">$i</span>++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>@<a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="re0">$password</span>, <a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">&#40;</span><span class="re0">$i</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$pass_uc</span> = <span class="kw2">TRUE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Check Numbers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="re0">$i</span> = <span class="nu0">48</span>; <span class="re0">$i</span> &lt;=<span class="nu0">57</span>; <span class="re0">$i</span>++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>@<a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="re0">$password</span>, <a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">&#40;</span><span class="re0">$i</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$pass_num</span> = <span class="kw2">TRUE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Check Weird Characters</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="re0">$i</span> = <span class="nu0">33</span>; <span class="re0">$i</span> &lt;=<span class="nu0">126</span>; <span class="re0">$i</span>++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Excempt</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$i</span>&gt;<span class="nu0">47</span> &amp;&amp; <span class="re0">$i</span>&lt;<span class="nu0">58</span><span class="br0">&#41;</span> || <span class="br0">&#40;</span><span class="re0">$i</span>&gt;<span class="nu0">64</span> &amp;&amp; <span class="re0">$i</span>&lt;<span class="nu0">91</span><span class="br0">&#41;</span> || <span class="br0">&#40;</span><span class="re0">$i</span>&gt;<span class="nu0">96</span> &amp;&amp; <span class="re0">$i</span>&lt;<span class="nu0">123</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>@<a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="re0">$password</span>, <a href="http://www.php.net/chr"><span class="kw3">chr</span></a><span class="br0">&#40;</span><span class="re0">$i</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$pass_weird</span> = <span class="kw2">TRUE</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Points</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_len</span><span class="br0">&#41;</span> <span class="re0">$pass_score</span> = <span class="re0">$pass_score</span> + <span class="nu0">10</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_lc</span><span class="br0">&#41;</span> <span class="re0">$pass_score</span> = <span class="re0">$pass_score</span> + <span class="nu0">20</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_uc</span><span class="br0">&#41;</span> <span class="re0">$pass_score</span> = <span class="re0">$pass_score</span> + <span class="nu0">20</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_num</span><span class="br0">&#41;</span> <span class="re0">$pass_score</span> = <span class="re0">$pass_score</span> + <span class="nu0">20</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_weird</span><span class="br0">&#41;</span> <span class="re0">$pass_score</span> = <span class="re0">$pass_score</span> + <span class="nu0">30</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Displaying</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$display</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#039;&lt;div style=&quot;width: 210px; height: 15px; border: 1px solid #919191; padding: 1px; font-size: 9px; color: #FFFFFF; font-family: Arial;&quot;&gt;&#039;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_score</span> &lt;= <span class="nu0">40</span><span class="br0">&#41;</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#039;&lt;div style=&quot;width: 65px; height: 13px; background: #910e0e; padding: 2px 0 0 5px;&quot;&gt;WEAK&lt;/div&gt;&#039;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_score</span> &gt; <span class="nu0">40</span> &amp;&amp; <span class="re0">$pass_score</span> &lt; <span class="nu0">70</span><span class="br0">&#41;</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#039;&lt;div style=&quot;width: 135px; height: 13px; background: #ceb827; padding: 2px 0 0 5px;&quot;&gt;AVERAGE&lt;/div&gt;&#039;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pass_score</span> &gt;= <span class="nu0">71</span><span class="br0">&#41;</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#039;&lt;div style=&quot;width: 205px; height: 13px; background: #3ca01a; padding: 2px 0 0 5px;&quot;&gt;STRONG&lt;/div&gt;&#039;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#039;&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$pass_score</span>;<br />
<span class="br0">&#125;</span></div>
<p>The script itself has a built in display bar which will visuallize how strong or weak the password maybe which could turn off. Here&#039;s an example of calling the script:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re0">$password</span> = <span class="st0">&quot;GoodBoy&quot;</span>;</p>
<p><span class="co1">//Showing the Password Strength with Visual Bar</span><br />
password_strength<span class="br0">&#40;</span><span class="re0">$password</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">//Not Showing anything at all but storing strength as a variable</span><br />
<span class="re0">$strength</span> = password_strength<span class="br0">&#40;</span><span class="re0">$password</span>, <span class="kw2">FALSE</span><span class="br0">&#41;</span>;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.crankberryblog.com/2010/php-password-strength-detector-script/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Secure PHP login without database</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database</link>
		<comments>http://www.crankberryblog.com/2009/secure-php-login-without-database#comments</comments>
		<pubDate>Fri, 23 Oct 2009 22:55:09 +0000</pubDate>
		<dc:creator>Jerry Low</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Security]]></category>
		<category><![CDATA[PHP Script]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143</guid>
		<description><![CDATA[Although not recommended but maybe for some reason you need to create a PHP login without the use of any database (SQL). For some reason you maybe scared to approach, but here I made a script that is fairly secure without utilizing any database at all. It allows users to login and stay logged in. If you are one of those people then here's the script for you. ]]></description>
			<content:encoded><![CDATA[<p>Although not recommended but maybe for some reason you need to create a PHP login without the use of any database (SQL). For some reason you maybe scared to approach, but here I made a script that is fairly secure without utilizing any database at all. It allows users to login and stay logged in. If you are one of those people then here&#039;s the script for you.</p>
<p>Now this script does not use any external files to store user names and password as it opens up more security flaws for hackers, so everything is managed in an array within the PHP. If somebody was able to get a hold of your PHP file this will compromise things but the chances of that happening is fairly close to utilizing a database. </p>
<p><strong>Features</strong></p>
<ul>
<li>Utilizes cookies to give users ability to stay logged in across multiple pages</li>
<li>Secure login algorithm mitigates hacking attempts</li>
</ul>
<p><strong>Drawbacks</strong></p>
<p>Now by not utilizing a database there are some drawbacks and they are:</p>
<ul>
<li>Users cannot change password and user names manually</li>
<li>Users can attempt login as many times as they want</li>
</ul>
<p>With that said, it means that usernames and passwords must be managed by an admin. If this is still something for you. If this is not for you wait around because I will convert this script into a database version in the future.</p>
<h3>Less Talk More Script</h3>
<p>Installation:</p>
<p>Just download all the necessary files which includes:</p>
<ul>
<li>_login.php</li>
<li>_login_page.php</li>
<li>_login_class.php</li>
<li>_login_users.php</li>
<li>login.php</li>
<li>logout.php</li>
</ul>
<p>Once you put these in your root folder you need to edit the users and settings. Open up _login_users.php and you&#039;ll see:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span></p>
<p><span class="co1">//My Login Script</span><br />
<span class="co1">//Attach this to any page that requires Login</span></p>
<p>
<span class="co1">//Users and Settings</span><br />
<span class="re0">$domain_code</span> = <span class="st0">&#039;website&#039;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">//Alpha Numeric and no space</span><br />
<span class="re0">$random_num_1</span> = <span class="nu0">20</span>;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Pick a random number between 1 to 500</span><br />
<span class="re0">$random_num_2</span> = <span class="nu0">565</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Pick a random number between 500 to 1000</span><br />
<span class="re0">$random_num_3</span> = <span class="nu0">3</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Pick a random number between 1 to 3</span></p>
<p><span class="co1">//Usernames can contain alphabets, numbers, hyphens and underscore only</span><br />
<span class="co1">//Set users below &#8211; Just add &#034; =&gt; &#034; with the first &#034; being</span><br />
<span class="co1">//the username and the second &#034; after the =&gt; being the password.</span><br />
<span class="co1">//Its an array so add an , after every password except for the</span><br />
<span class="co1">//last one in the list. As shown below</span><br />
<span class="co1">//Eg. $users = array(</span><br />
<span class="co1">//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;user1&#039; =&gt; &#039;password&#039;,</span><br />
<span class="co1">//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;user2&#039; =&gt; &#039;password&#039;</span><br />
<span class="co1">//&nbsp; &nbsp; &nbsp; );</span></p>
<p><span class="re0">$users</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#039;user1&#039;</span> =&gt; <span class="st0">&#039;password&#039;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#039;user2&#039;</span> =&gt; <span class="st0">&#039;password&#039;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span>;</p>
<p>
<span class="kw2">?&gt;</span></div>
<p>Modify the domain code and three random numbers. The three random numbers is the key that makes login <em>secure and unique</em> to your website only. Then at the bottom you can create all of your users.</p>
<p>Now in every page that you require the user to login just add the following code to the very top of the page, exactly on line 1.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span> <span class="kw1">require</span><span class="br0">&#40;</span><span class="st0">&#039;_login.php&#039;</span><span class="br0">&#41;</span>; <span class="kw2">?&gt;</span></div>
<p>That&#039;s pretty much all you need to do to install the secure login script. The only other thing if you want is you can edit _login_page.php. That&#039;s the page people see when they need to login.</p>
<p><strong>Login and Logout</strong></p>
<p>You can lead users to login and logout with links to login.php and logout.php as such.</p>
<div class="dean_ch" style="white-space: wrap;">&lt;a href=&quot;login.php&quot;&gt;Login&lt;/a&gt; | &lt;a href=&quot;logout.php&quot;&gt;Logout&lt;/a&gt;</div>
<p><strong>Displaying Macors</strong></p>
<p>In this case the only macro you can call up is the username after they have logged in. You can call it in a welcome back message like this (placed in your HTML).</p>
<div class="dean_ch" style="white-space: wrap;">Welcome back <span class="kw2">&lt;?php</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$login</span>-&gt;<span class="me1">username</span>; <span class="kw2">?&gt;</span></div>
<p><strong>Download the files:</strong><br />
<a href="http://www.crankberryblog.com/files/php-login-without-database.zip">PHP Login Without Database.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crankberryblog.com/2009/secure-php-login-without-database/feed</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>
