<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.bytemycode.com/rssformat.xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>byteMyCode: Related Snippets</title>
		<link>http://www.bytemycode.com</link>
		<description>Related snippets for this snippet.</description>
		<pubDate>Thu, 04 Dec 2008 17:00:54 +0000</pubDate>
		<copyright>1998-2008 </copyright>
		<language>en-us</language>
		<image>
		      <link>http://www.bytemycode.com</link>
		      <url>http://www.bytemycode.com/img/rss_title.gif</url>
		      <title>byteMyCode</title>
		</image>

	<item>
	<title>xoops token auto change</title>
	<link>http://www.bytemycode.com/snippets/snippet/866/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/866/comments/</comments>
	<pubDate>Fri, 28 Nov 2008 03:12:09 +0000</pubDate>
	<dc:creator>RB</dc:creator>
	<category>PHP, xoops</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/866/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Nov. 28th, 2008  3:12 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/866/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/RB/" title="Beginner">RB</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/xoops">xoops</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/866/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>auto create and check token with different xoops versio</p>
		]]>
	</description>
</item><item>
	<title>Unique random key</title>
	<link>http://www.bytemycode.com/snippets/snippet/861/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/861/comments/</comments>
	<pubDate>Tue, 04 Nov 2008 08:32:56 +0000</pubDate>
	<dc:creator>cicero</dc:creator>
	<category>identify, Key, PHP, Random, unique</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/861/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Nov. 4th, 2008  8:32 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/861/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/cicero/" title="Beginner">cicero</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/identify">identify</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Key">Key</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Random">Random</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/unique">unique</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/861/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 1
			<p>This php script provides a unique random key with 32 characters and can be used to avoid the system to pass some primary keys across the url, by example.</p>
		]]>
	</description>
</item><item>
	<title>Find a File</title>
	<link>http://www.bytemycode.com/snippets/snippet/859/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/859/comments/</comments>
	<pubDate>Wed, 29 Oct 2008 11:26:38 +0000</pubDate>
	<dc:creator>Celebhir</dc:creator>
	<category>Directory, File, PHP, Recursive, search</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/859/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Oct. 29th, 2008  11:26 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/859/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Celebhir/" title="Helper">Celebhir</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Directory">Directory</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/File">File</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Recursive">Recursive</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/search">search</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/859/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>This function tries to locate a file in a give folder (either single level, or in any sub folder). Returns the relative file and path, or FALSE if not found. Skips over "." and "..".</p>
		]]>
	</description>
</item><item>
	<title>Find a Directory</title>
	<link>http://www.bytemycode.com/snippets/snippet/858/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/858/comments/</comments>
	<pubDate>Wed, 29 Oct 2008 10:51:01 +0000</pubDate>
	<dc:creator>Celebhir</dc:creator>
	<category>Directory, find, Folder, PHP, Recursive, search</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/858/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Oct. 29th, 2008  10:51 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/858/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Celebhir/" title="Helper">Celebhir</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Directory">Directory</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/find">find</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Folder">Folder</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Recursive">Recursive</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/search">search</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/858/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>This function takes a directory, and a "folder" search parameter.<br />If it finds the directory (either in single level, or any sub folder) it will return the relative path of that folder. "FALSE" if not found. Skips over files and "." and ".." directories. Recursive by default.</p>
		]]>
	</description>
</item><item>
	<title>List Directory</title>
	<link>http://www.bytemycode.com/snippets/snippet/857/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/857/comments/</comments>
	<pubDate>Wed, 29 Oct 2008 09:21:33 +0000</pubDate>
	<dc:creator>Celebhir</dc:creator>
	<category>Directory, Files, PHP, Recursive, structure, tree</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/857/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Oct. 29th, 2008  9:21 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/857/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Celebhir/" title="Helper">Celebhir</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Directory">Directory</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Files">Files</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Recursive">Recursive</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/structure">structure</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/tree">tree</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/857/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>Takes a given directory and lists all the files and folders under it, including sub folders. Resulting array contains associative (folders) and indexed (files) elements. Doesn't return "." and ".."</p>
		]]>
	</description>
</item><item>
	<title>Clean PHP Templating system</title>
	<link>http://www.bytemycode.com/snippets/snippet/848/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/848/comments/</comments>
	<pubDate>Thu, 28 Aug 2008 09:33:45 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>buffering, errors, Output, PHP, template</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/848/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Aug. 28th, 2008  9:33 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/848/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/buffering">buffering</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/errors">errors</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Output">Output</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/template">template</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/848/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 1
			<p>Best use of ob_, custom error handling, and variable variales evar:     simple templating.<br /><br />_parse($filename[,$locals])<br />includes $filename and renders its output to the return value.  $locals, if used, will add a set of variables to the included context.<br /><br />Parse($template[,$locals])<br />Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.<br /><br />t($template[,$obj])<br />...<br />t()<br />Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.<br /><br />Play around with t(..) to find out more; I don't feel like documenting it.</p>
		]]>
	</description>
</item><item>
	<title>PHP/MySQL implementation of SQL Functions</title>
	<link>http://www.bytemycode.com/snippets/snippet/847/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/847/comments/</comments>
	<pubDate>Wed, 13 Aug 2008 23:34:39 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>easy, mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/847/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Aug. 13th, 2008  11:34 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/847/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/easy">easy</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/847/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>My previous entry on an easy to use SQLite interface for XUL/JS got me thinking: how many times have I had to write functions that were just wrappers for a little SQL?<br /><br />Below is the fruits of that little query (excuse the pun).  Forgive the dbXXX functions; my implementation depended on a small portion of a larger mysql library that I've grown accustomed to coding with.</p>
		]]>
	</description>
</item><item>
	<title>Very lightweight PHP Templating system</title>
	<link>http://www.bytemycode.com/snippets/snippet/827/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/827/comments/</comments>
	<pubDate>Fri, 27 Jun 2008 11:29:44 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>PHP, templating</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/827/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Jun. 27th, 2008  11:29 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/827/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/templating">templating</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/827/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>A simple function (with support) that can provide the backbone to any templating system.</p>
		]]>
	</description>
</item><item>
	<title>Javascript port of PHP's ParseURL</title>
	<link>http://www.bytemycode.com/snippets/snippet/798/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/798/comments/</comments>
	<pubDate>Thu, 06 Mar 2008 03:09:46 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>JavaScript, parse_url, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/798/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 6th, 2008  3:09 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/798/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/parse_url">parse_url</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/798/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 3
			<p>Simple.  It's parse_url, from PHP, implemented in Javascript.  Seen a lot of similar ones around the web, but they were all bulky code and none of them took advantage of the RegEx parser in JS.<br /><br />Applied as a member of the String prototype, so just call as myURL.parseURL();  Will return a named object with naming identical to that of PHP's function.<br /><br />Additional: if first argument is present, will break the querystring up into name/value pairs, unescaped, and return that instead of the raw querystriing.</p>
		]]>
	</description>
</item><item>
	<title>Amazon Simple Storage Service-Create Bucket in PHP</title>
	<link>http://www.bytemycode.com/snippets/snippet/752/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/752/comments/</comments>
	<pubDate>Tue, 13 Nov 2007 12:37:27 +0000</pubDate>
	<dc:creator>cyberhitesh</dc:creator>
	<category>Online, PHP, PHP5, Storage, Unlimited</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/752/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Nov. 13th, 2007  12:37 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/752/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/cyberhitesh/" title="Beginner">cyberhitesh</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Online">Online</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP5">PHP5</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Storage">Storage</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Unlimited">Unlimited</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/752/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 3
			<p>Software Requirements:<br /><br />Crypt_HMAC:<br />http://pear.php.net/package/Crypt_HMAC<br />HTTP_REQUEST:<br />http://pear.php.net/package/HTTP_Request<br />PEAR:<br />http://pear.php.net/</p>
		]]>
	</description>
</item><item>
	<title>Simple, Easy PHP Hit Counter</title>
	<link>http://www.bytemycode.com/snippets/snippet/751/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/751/comments/</comments>
	<pubDate>Wed, 07 Nov 2007 14:45:07 +0000</pubDate>
	<dc:creator>Idlemind</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/751/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Nov. 7th, 2007  2:45 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/751/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Idlemind/" title="Helper">Idlemind</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/751/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>If it's a .php page, you can simply include this file where you want a hit counter to appear.<br /><br />One file - text output.  Very simple, very easy.  Based off the filename of the page (creates a pagename.counter file to hold the count).<br />(No use for it myself - made it for a friend).</p>
		]]>
	</description>
</item><item>
	<title>Screen Resolution Detection</title>
	<link>http://www.bytemycode.com/snippets/snippet/748/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/748/comments/</comments>
	<pubDate>Mon, 22 Oct 2007 08:43:51 +0000</pubDate>
	<dc:creator>richard123</dc:creator>
	<category>JavaScript, PHP, resolution</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/748/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 22nd, 2007  8:43 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/748/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/richard123/" title="Beginner">richard123</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/resolution">resolution</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/748/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This detects screen resolution using javascript and makes it available to php by way of cookies.</p>
		]]>
	</description>
</item><item>
	<title>Cycle - Cycles through arguments</title>
	<link>http://www.bytemycode.com/snippets/snippet/746/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/746/comments/</comments>
	<pubDate>Thu, 18 Oct 2007 08:32:17 +0000</pubDate>
	<dc:creator>Tr0y</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/746/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Oct. 18th, 2007  8:32 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/746/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/Tr0y/" title="Beginner">Tr0y</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/746/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>Use this to print alternating values from an array.<br /><br />It cycles through a series of values based on an iteration number.<br /><br />For example, you could use this for alternating background colors.</p>
		]]>
	</description>
</item><item>
	<title>Track and display users online time</title>
	<link>http://www.bytemycode.com/snippets/snippet/736/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/736/comments/</comments>
	<pubDate>Wed, 03 Oct 2007 20:23:28 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>mysql, PHP, Time, tracking</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/736/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Oct. 3rd, 2007  8:23 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/736/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Time">Time</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/tracking">tracking</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/736/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>Well after searching the internet for something similar to this, I didn't come up with anything...so I made my own! This simple script will track your members' time spent on your website. Please feel free to give comments/suggestions/feedback.</p>
		]]>
	</description>
</item><item>
	<title>Javascript -> PHP Serializer for Prototype</title>
	<link>http://www.bytemycode.com/snippets/snippet/733/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/733/comments/</comments>
	<pubDate>Thu, 27 Sep 2007 08:02:39 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>JavaScript, PHP, Prototype, serialize</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/733/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Sep. 27th, 2007  8:02 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/733/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Prototype">Prototype</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/serialize">serialize</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/733/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is the final version of my Javascript serializer targetted at PHP.<br /><br />The point: <br /><blockquote>Objects are most easily passed over the network as serialized strings.  Between serialization and unserialization, serialization is by far the easier of the two.  Since object passing can sometimes be a process-hungry thing, we want to do things as quickly as possible.<br /><br />My solution is to always do the hard part in compiled code, while doing the easy part in script.  That is, whichever way you're passing an Object, you want to pass it in a natively decoded format for the target.<br /><br />Since I work mostly in PHP, this meant writing a module that would be able to generate a string that can be decoded with PHP's unserialize() function into a PHP Associative Array (or other applicable type).</blockquote><br />Notes:<br /><blockquote>This lib REQUIRES the Prototype lib.  You can hack prototype out of it, of course (by replacing the references to Object.extend() with explicit assignments), but I can't imagine why you'd want to bother; it's used mostly with Ajax.Request anyway.<br /><br />Previous versions of this code would add the .toPHP() member to the Object prototype.  After trying to enumerate things, I found that this is a REALLY bad thing to do, as toPHP springs up where it's not wanted in ALL objects.  As a result, I've opted to go the Prototype route and apply it as a member of the Object object.<br /><br />Please note that if you pass a serialized string to PHP via GET or POST, you'll need to stripslashes() before unserialization.</blockquote><br /><br /><br />Javascript sample of use:<br /><br />var myObject = {<br />	name:'value',<br />	test:['Array','of','strings'],<br />	bool:false,<br />	timestamp: new Date(),<br />	float: 3.1415926539,<br />	number: 42,<br />	func: function () {<br />		alert('Member functions are always omitted from serialization');<br />	}<br />}<br />alert(Object.toPHP(myObject));<br /><br />Output: <br /><blockquote>a:7:{s:4:"name";s:5:"value";s:4:"test";a:3:{i:0;s:5:"Array";i:1;s:2:"of";i:2;s:7:"strings";}s:4:"bool";b:0;s:9:"timestamp";i:1190897619824;s:5:"float";d:3.1415926539;s:6:"number";i:42;s:4:"func";null}</blockquote><br /><br />Sample of subsequent unserialization in PHP (passed via POST as 'myobject')<br /><br />$myObject=unserialize(stripslashes($_POST['myobject']));<br />var_dump($myObject);<br /><br />Output:<br /><blockquote>array(7) {<br />  ["name"]=><br />  string(5) "value"<br />  ["test"]=><br />  array(3) {<br />    [0]=><br />    string(5) "Array"<br />    [1]=><br />    string(2) "of"<br />    [2]=><br />    string(7) "strings"<br />  }<br />  ["bool"]=><br />  bool(false)<br />  ["timestamp"]=><br />  int(1192296601)<br />  ["float"]=><br />  float(3.1415926539)<br />  ["number"]=><br />  int(42)<br />  ["func"]=><br />  NULL<br />}</blockquote></p>
		]]>
	</description>
</item><item>
	<title>Export MySQL query to Excel</title>
	<link>http://www.bytemycode.com/snippets/snippet/718/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/718/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 23:34:05 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>excel, mysql, PHP, query</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/718/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  11:34 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/718/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/excel">excel</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/query">query</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/718/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is a cool function that lets you save MySQL query data to an Excel spreadsheet. This is good for taking a backup or if you want to change a lot of information fast, then re-upload it.<br /><br />I will use the config.php and class.mysql.php files from <a href='http://www.bytemycode.com/snippets/snippet/710/' target="_blank">MySQL DB Class with Extras</a>, so please look at those also.</p>
		]]>
	</description>
</item><item>
	<title>Print MySQL Query</title>
	<link>http://www.bytemycode.com/snippets/snippet/717/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/717/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 23:27:18 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>mysql, PHP, query</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/717/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  11:27 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/717/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/query">query</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/717/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is a little function that you can use to print out results of a query. It will dynamicly generate the table for you (like phpMyAdmin). This is a nice little checker that is fast. It beats logging into phpMyAdmin and typing in your query there.<br /><br />I will use the config.php and class.mysql.php files from <a href='http://www.bytemycode.com/snippets/snippet/710/' target="_blank">MySQL DB Class with Extras</a>, so please look at those also.</p>
		]]>
	</description>
</item><item>
	<title>Authorize.net Class</title>
	<link>http://www.bytemycode.com/snippets/snippet/716/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/716/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 23:13:29 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>"credit card", authorize.net, Class, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/716/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  11:13 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/716/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22credit+card%22">"credit card"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/authorize.net">authorize.net</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/716/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is an authorize.net credit card processing class. Required elements are:<br />- Authorize.net account (live and/or sandbox)<br />- PHP w/ CURL installed<br />- SSL certificate installed on server<br />- <a href='http://www.bytemycode.com/snippets/snippet/711/' target="_blank">My Simple Error Class</a><br /><br />And use my <a href='http://www.bytemycode.com/snippets/snippet/712/' target="_blank">Easy Credit Card Class</a> as a pre-processor to this class.<br /><br />For more information on authorize.net just go to their website and download their developers information.</p>
		]]>
	</description>
</item><item>
	<title>PHP email validation</title>
	<link>http://www.bytemycode.com/snippets/snippet/714/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/714/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 22:24:04 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>Email, PHP, regex, Validate</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/714/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  10:24 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/714/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Email">Email</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/regex">regex</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Validate">Validate</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/714/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is a simple function to check if an email is valid or not.</p>
		]]>
	</description>
</item><item>
	<title>Another Random Generator</title>
	<link>http://www.bytemycode.com/snippets/snippet/713/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/713/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 19:28:33 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>PHP, Random</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/713/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  7:28 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/713/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Random">Random</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/713/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 1
			<p>This little function does great for passwords, usernames, files, and anything else you need a random string for.</p>
		]]>
	</description>
</item><item>
	<title>Easy Credit Card Class</title>
	<link>http://www.bytemycode.com/snippets/snippet/712/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/712/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 17:21:21 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>"credit card", Class, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/712/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  5:21 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/712/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22credit+card%22">"credit card"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/712/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 4
			<p>This is a simple credit card validation class that you can check for most issues before you process you form through paypal, authorize.net, or anywhere else. This also uses my <a href='http://www.bytemycode.com/snippets/snippet/711/' target="_blank">Simple Error Class</a>, the error class is required for this.</p>
		]]>
	</description>
</item><item>
	<title>Simple Error Class</title>
	<link>http://www.bytemycode.com/snippets/snippet/711/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/711/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 16:51:21 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>Class, error, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/711/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  4:51 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/711/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/error">error</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/711/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>A very simple error class that can be pretty handy.</p>
		]]>
	</description>
</item><item>
	<title>MySQL DB Class with Extras</title>
	<link>http://www.bytemycode.com/snippets/snippet/710/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/710/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 15:05:35 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>Class, mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/710/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  3:05 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/710/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/710/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This is my MySQL database class that I use for all of my sites. Some included features are:<br />- Get execution time<br />- Error reporting (screen and email)<br />- SQL stats</p>
		]]>
	</description>
</item><item>
	<title>Delete files not in database</title>
	<link>http://www.bytemycode.com/snippets/snippet/709/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/709/comments/</comments>
	<pubDate>Tue, 04 Sep 2007 14:13:23 +0000</pubDate>
	<dc:creator>explode</dc:creator>
	<category>mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/709/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Sep. 4th, 2007  2:13 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/709/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/explode/" title="Helper">explode</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/709/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>I made this script to delete any unneeded files from the server that weren't being used by the database. Of course you can expand this a lot more, but I cut it down a little to put it up here.</p>
		]]>
	</description>
</item><item>
	<title>Javascript->PHP serializer</title>
	<link>http://www.bytemycode.com/snippets/snippet/666/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/666/comments/</comments>
	<pubDate>Mon, 04 Jun 2007 15:06:47 +0000</pubDate>
	<dc:creator>Fordiman</dc:creator>
	<category>"object passing", JavaScript, PHP, serialize</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/666/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Jun. 4th, 2007  3:06 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/666/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Scripter">Fordiman</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22object+passing%22">"object passing"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/serialize">serialize</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/666/comments/">6 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 6
			<p>This is a quick set of overrides for Javascript so that any variable can be passed to PHP in a GET/POST activity.  Just call myVar.toPHP();<br /><br />I use this little set of functions extensively in a little Javascript/PHP RPC handler I wrote.  I don't have the reverse function, as I pass JSON back to the browser for the return value.<br /><br />Note: This lib is not safe for binaries or HTML Elements.  The former will come out similar to FTP ASCII breaks, and the latter will cause infinite recursion.  If you want to make a speical case for HTML Elements, do so; you could probably just test for parentNode and create a 'safe' object from that.  I didn't need it, so I didn't code it.<br /><br />As for binary safety, at some point between toPHP/escape/post/urldecode/unserialize, the object breaks.  Rather than create a huge fix for something I didn't need to do, I put in a quick match/hack.  Don't like it?  Write the fix yourself.</p>
		]]>
	</description>
</item><item>
	<title>Aspect Oriented PHP</title>
	<link>http://www.bytemycode.com/snippets/snippet/664/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/664/comments/</comments>
	<pubDate>Fri, 01 Jun 2007 19:30:38 +0000</pubDate>
	<dc:creator>albud</dc:creator>
	<category>aspects, design, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/664/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Jun. 1st, 2007  7:30 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/664/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/albud/" title="Helper">albud</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/aspects">aspects</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/design">design</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/664/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 7
			<p>A proof of concept idea I had for implementing an aspect oriented   framework in PHP (yes, I know about http://aophp.net, but it requires a module).<br /><br />I thought it was neat, so I'm going to share it.<br /><br />Hope someone likes it. <img src="http://www.bytemycode.com/img/wysiwyg/emo-smile.gif" /></p>
		]]>
	</description>
</item><item>
	<title>Reverse register_globals</title>
	<link>http://www.bytemycode.com/snippets/snippet/659/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/659/comments/</comments>
	<pubDate>Mon, 21 May 2007 00:22:40 +0000</pubDate>
	<dc:creator>SecondV</dc:creator>
	<category>"register globals" register_globals,, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/659/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. May. 21st, 2007  12:22 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/659/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/SecondV/" title="Scripter">SecondV</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22register+globals%22+register_globals%2C">"register globals" register_globals,</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/659/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 7
			<p>This function will reverse the affects of register_globals</p>
		]]>
	</description>
</item><item>
	<title>Only allow _POST's from your domain</title>
	<link>http://www.bytemycode.com/snippets/snippet/658/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/658/comments/</comments>
	<pubDate>Sun, 20 May 2007 22:58:18 +0000</pubDate>
	<dc:creator>SecondV</dc:creator>
	<category>allow, deny, DOMAIN, PHP, post</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/658/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. May. 20th, 2007  10:58 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/658/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/SecondV/" title="Scripter">SecondV</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/allow">allow</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/deny">deny</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/DOMAIN">DOMAIN</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/post">post</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/658/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>This small snippet will not allow _POST requests from a 'foreign' domain. It relies on the HTTP_REFERER variable.</p>
		]]>
	</description>
</item><item>
	<title>Check if a URL exists/is online.</title>
	<link>http://www.bytemycode.com/snippets/snippet/657/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/657/comments/</comments>
	<pubDate>Sun, 20 May 2007 05:27:54 +0000</pubDate>
	<dc:creator>SecondV</dc:creator>
	<category>Online, PHP, URL</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/657/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. May. 20th, 2007  5:27 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/657/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/SecondV/" title="Scripter">SecondV</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Online">Online</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/URL">URL</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/657/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 10
			<p>This simple function will check if a url is valid (going by parse_url()) and if it's 'online' - by seeing if it returns a 302, 301, or 200 status code.</p>
		]]>
	</description>
</item><item>
	<title>Send SMS from PHP (To almost every country)</title>
	<link>http://www.bytemycode.com/snippets/snippet/647/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/647/comments/</comments>
	<pubDate>Sun, 29 Apr 2007 16:42:37 +0000</pubDate>
	<dc:creator>Nico</dc:creator>
	<category>API, Class, message, PHP, Send, SMS</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/647/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Apr. 29th, 2007  4:42 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/647/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Nico/" title="Helper">Nico</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/API">API</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/message">message</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Send">Send</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/SMS">SMS</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/647/comments/">5 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>This PHP class allows you to send SMS to almost every country directly from your website. All you need is an account on <a href='http://www.tm4b.com' target="_blank">www.tm4b.com</a> and PHP 5.<br /><br />Also required is either <a href='http://curl.haxx.se/' target="_blank">cURL</a> or <a href='http://www.php.net/filesystem#ini.allow-url-fopen' target="_blank">allow_url_fopen</a> enabled in php.ini</p>
		]]>
	</description>
</item><item>
	<title>All-Purpose Form Pre-Validation</title>
	<link>http://www.bytemycode.com/snippets/snippet/638/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/638/comments/</comments>
	<pubDate>Tue, 10 Apr 2007 21:39:42 +0000</pubDate>
	<dc:creator>snowdonkey</dc:creator>
	<category>Form, PHP, Validate</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/638/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Apr. 10th, 2007  9:39 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/638/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/snowdonkey/" title="Helper">snowdonkey</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Form">Form</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Validate">Validate</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/638/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 2
			<p>The following script is a single interface for pre-validating <i>any</i> HTML form.  It lets you validate your form data the way you want, while handling the rudimentary tasks itself.<br /><br />1)  Change just one variable to make it work with $_GET or $_POST or $_REQUEST.<br /><br />2)  Name which elements are 'required' all at once in a hidden HTML text input.<br /><br />3)  Easily provide field descriptions in hidden HTML text inputs that you can use to print error statements.<br /><br />4)  Call a single function to print out error statements that you can easily style with CSS.<br /><br />5)  It automatically checks if fields marked 'required' have been filled out.<br /><br />Most of the pre-validation code is from PHP 5: Unleashed by Sams Publishing.  I found it extremely useful for a recent project.  Sharing it here, I removed some unnecessary functions, and tried to simplify some points.  <br /><br />All the comments are my own; hopefully I provided more than enough explanation.  <img src="http://www.bytemycode.com/img/wysiwyg/emo-cool.gif" /></p>
		]]>
	</description>
</item><item>
	<title>MySQL Database Class</title>
	<link>http://www.bytemycode.com/snippets/snippet/636/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/636/comments/</comments>
	<pubDate>Wed, 04 Apr 2007 08:52:49 +0000</pubDate>
	<dc:creator>ushi</dc:creator>
	<category>Anti-Injection, Class, Database, mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/636/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Apr. 4th, 2007  8:52 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/636/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/ushi/" title="Helper">ushi</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Anti-Injection">Anti-Injection</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Database">Database</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/636/comments/">6 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 7
			<p>A simple MySQL class for use in PHP.<br />Feel free to suggest improvements.</p>
		]]>
	</description>
</item><item>
	<title>PHP CSS Preprocessor</title>
	<link>http://www.bytemycode.com/snippets/snippet/633/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/633/comments/</comments>
	<pubDate>Sat, 10 Mar 2007 19:13:21 +0000</pubDate>
	<dc:creator>albud</dc:creator>
	<category>CSS, PHP, processor</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/633/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sat. Mar. 10th, 2007  7:13 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/633/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/albud/" title="Helper">albud</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/CSS">CSS</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/processor">processor</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/633/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 12
			<p>Don't know if anyone will find this handly, but here's a CSS processor that I wrote that allows me to nest CSS Blocks, and various other things, making for an easier to maintain CSS file.<br /><br />Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.<br /><br />Things that it includes:<br />*Nested CSS Rules<br />*Removes Whitespace<br />*Allows for // comments<br />*Removes comments (so put them in at no cost)<br /><br />Please let me know what you think <br /><img src="http://www.bytemycode.com/img/wysiwyg/emo-smile.gif" /></p>
		]]>
	</description>
</item><item>
	<title>Simple Image Resize in GD</title>
	<link>http://www.bytemycode.com/snippets/snippet/624/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/624/comments/</comments>
	<pubDate>Tue, 06 Mar 2007 14:36:01 +0000</pubDate>
	<dc:creator>wlasson</dc:creator>
	<category>"image resize", GD, images, PHP, Resize</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/624/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Mar. 6th, 2007  2:36 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/624/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/wlasson/" title="Beginner">wlasson</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22image+resize%22">"image resize"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/GD">GD</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/images">images</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Resize">Resize</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/624/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 13
			<p>This is a simple function that resizes and image using the GD add on for PHP. <br />Just a disclaimer: I know its not perfect, but i figured i would post it because the only other one on here is way confusing to some new PHP developers. Hopefully this one will help you learn how to use GD, and then you can write a better one.</p>
		]]>
	</description>
</item><item>
	<title>Calculate Age</title>
	<link>http://www.bytemycode.com/snippets/snippet/611/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/611/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 16:01:10 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/611/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  4:01 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/611/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/611/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 12
			<p>With this function you can calculate the age of a person<br /><br />Example:<br />echo "Age is: " . age("1984-07-05");<br /><br />Result will be (23 Feb 2005) = "Age is: 20"</p>
		]]>
	</description>
</item><item>
	<title>Simple Count Records from MySQL DB Table</title>
	<link>http://www.bytemycode.com/snippets/snippet/610/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/610/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 15:56:58 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/610/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  3:56 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/610/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/610/comments/">5 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> -6
			<p>Get the count of records from DB</p>
		]]>
	</description>
</item><item>
	<title>Multi Select Box to MySql DB Table</title>
	<link>http://www.bytemycode.com/snippets/snippet/609/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/609/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 15:53:27 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/609/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  3:53 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/609/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/609/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 7
			<p>Generate multi select box from data in db, then when submitted, each selection is written to a db table as it's own record, each tied together by a common record id.</p>
		]]>
	</description>
</item><item>
	<title>Display Contents of a Folder</title>
	<link>http://www.bytemycode.com/snippets/snippet/608/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/608/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 15:48:17 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/608/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  3:48 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/608/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/608/comments/">5 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 14
			<p>Display contents of a folder, see comments in code.</p>
		]]>
	</description>
</item><item>
	<title>Created Comma Seperated List from MySQL DB</title>
	<link>http://www.bytemycode.com/snippets/snippet/607/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/607/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 15:45:43 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/607/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  3:45 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/607/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/607/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 6
			<p>Pull items from a mysql db table and display in the following format-<br />item1, item2, item3<br /><br />In the example code, the query will return all items that have the color "red" specified in the db.</p>
		]]>
	</description>
</item><item>
	<title>Chatterbox2</title>
	<link>http://www.bytemycode.com/snippets/snippet/606/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/606/comments/</comments>
	<pubDate>Thu, 01 Mar 2007 14:09:24 +0000</pubDate>
	<dc:creator>ushi</dc:creator>
	<category>ajax, Chat, JavaScript, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/606/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Mar. 1st, 2007  2:09 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/606/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/ushi/" title="Helper">ushi</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/ajax">ajax</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Chat">Chat</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/606/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 14
			<p>Simple chatting script to be placed on a corner of a website <img src="http://www.bytemycode.com/img/wysiwyg/emo-smile.gif" /><br />Also a good example how to use ajax.</p>
		]]>
	</description>
</item><item>
	<title>Mass Email from MySQL DB</title>
	<link>http://www.bytemycode.com/snippets/snippet/605/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/605/comments/</comments>
	<pubDate>Wed, 28 Feb 2007 15:41:15 +0000</pubDate>
	<dc:creator>mjlintz</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/605/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Feb. 28th, 2007  3:41 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/605/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/mjlintz/" title="Helper">mjlintz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/605/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>Mass email list of email addresses from a mysql db table.</p>
		]]>
	</description>
</item><item>
	<title>PHP - Make URLs clickable (And short down)</title>
	<link>http://www.bytemycode.com/snippets/snippet/602/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/602/comments/</comments>
	<pubDate>Wed, 28 Feb 2007 12:30:59 +0000</pubDate>
	<dc:creator>Nico</dc:creator>
	<category>clickable, PHP, URL</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/602/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Feb. 28th, 2007  12:30 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/602/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Nico/" title="Helper">Nico</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/clickable">clickable</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/URL">URL</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/602/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 19
			<p>This function makes URLs in a given text clickable, and shorts down the link text if it's length is over the specified one. (Like vBulletin, etc... does)<br /><br /><br />PS:<br />Please explain negative votes, they're pointless otherwise...</p>
		]]>
	</description>
</item><item>
	<title>List files in dir</title>
	<link>http://www.bytemycode.com/snippets/snippet/597/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/597/comments/</comments>
	<pubDate>Mon, 26 Feb 2007 01:44:18 +0000</pubDate>
	<dc:creator>lolfejs</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/597/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Feb. 26th, 2007  1:44 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/597/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/lolfejs/" title="Helper">lolfejs</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/597/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>List files in your current di</p>
		]]>
	</description>
</item><item>
	<title>Easy calendar</title>
	<link>http://www.bytemycode.com/snippets/snippet/596/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/596/comments/</comments>
	<pubDate>Sat, 24 Feb 2007 13:48:42 +0000</pubDate>
	<dc:creator>lolfejs</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/596/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sat. Feb. 24th, 2007  1:48 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/596/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/lolfejs/" title="Helper">lolfejs</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/596/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 12
			<p>Here is an easy calendar!<br /><br />Hope you like it dude =)</p>
		]]>
	</description>
</item><item>
	<title>Tiny PHP Uploader</title>
	<link>http://www.bytemycode.com/snippets/snippet/594/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/594/comments/</comments>
	<pubDate>Thu, 22 Feb 2007 17:20:23 +0000</pubDate>
	<dc:creator>fleft</dc:creator>
	<category>File, Files, management, PHP, upload, uploader</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/594/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Feb. 22nd, 2007  5:20 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/594/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/fleft/" title="Beginner">fleft</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/File">File</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Files">Files</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/management">management</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/upload">upload</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/uploader">uploader</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/594/comments/">4 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>This is a Tiny PHP Uploading script. It SHOULD be safe from both really large files and non-image files.</p>
		]]>
	</description>
</item><item>
	<title>Page Hits Counter</title>
	<link>http://www.bytemycode.com/snippets/snippet/589/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/589/comments/</comments>
	<pubDate>Mon, 12 Feb 2007 19:00:41 +0000</pubDate>
	<dc:creator>snowdonkey</dc:creator>
	<category>"hits counter", cookies, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/589/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Feb. 12th, 2007  7:00 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/589/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/snowdonkey/" title="Helper">snowdonkey</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22hits+counter%22">"hits counter"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/cookies">cookies</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/589/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 6
			<p>A simple page hits counter that uses a single cookie to tell the user how many times they have visited the page.</p>
		]]>
	</description>
</item><item>
	<title>Search engine keyword highlighter.</title>
	<link>http://www.bytemycode.com/snippets/snippet/588/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/588/comments/</comments>
	<pubDate>Sun, 11 Feb 2007 08:01:34 +0000</pubDate>
	<dc:creator>Nico</dc:creator>
	<category>google, highlight, keywords, PHP, search, Yahoo</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/588/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Feb. 11th, 2007  8:01 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/588/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Nico/" title="Helper">Nico</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/google">google</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/highlight">highlight</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/keywords">keywords</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/search">search</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Yahoo">Yahoo</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/588/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 11
			<p>If a visitor comes to your site from a search engine such as Google or Yahoo, this function will highlight the keywords in a given text the user used for his search.</p>
		]]>
	</description>
</item><item>
	<title>Random Password Generator (based on word list)</title>
	<link>http://www.bytemycode.com/snippets/snippet/578/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/578/comments/</comments>
	<pubDate>Fri, 19 Jan 2007 14:37:55 +0000</pubDate>
	<dc:creator>inxilpro</dc:creator>
	<category>"word list", Generator, Password, PHP, Random</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/578/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Jan. 19th, 2007  2:37 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/578/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/inxilpro/" title="Helper">inxilpro</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22word+list%22">"word list"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Generator">Generator</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Password">Password</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Random">Random</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/578/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 14
			<p>This is a random password generator that produces understandable passwords based on word lists.  I've only included a 3 entry world list because you should chose a list based on your password requirements and your users.  If you need to generate passwords that are 14 characters in length, you will want a different list than if you're generating 8 character passwords.  And depending on your users, you may want to use certain lists.  The list I use is about 4000 words that are 5-7 characters long, all well-known words that have had potentially objectionable content removed.  For security reasons I don't want to include this list.<br /><br />A note on security: though this generates relatively strong passwords for the average user, they are particularly susceptible to brute-force attacks.  This is even more an issue if somehow your word list gets compromised.  I would not recommend using this function for anything where a highly secure password is needed.<br /><br />A note on choosing your list: You'll also see that I've built the system to avoid generating passwords with zeros and ones in them.  This is because zero and upper-case "o" can be confused as can one, lower-case "L" and upper-case "i."  When choosing my word list I was also sure to strip out all words that start with the letter "o" or "i" (to prevent the optional ucfirst() from creating 0/O and I/1 confusion) and words that contain the letter "L" (to prevent l/1 confusion).  I find that this greatly helps with preventing confusion, but again weakens the security of the passwords some.  It's your choice.</p>
		]]>
	</description>
</item><item>
	<title>PHP/MySQL Authentication</title>
	<link>http://www.bytemycode.com/snippets/snippet/577/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/577/comments/</comments>
	<pubDate>Mon, 15 Jan 2007 17:30:36 +0000</pubDate>
	<dc:creator>Idlemind</dc:creator>
	<category>Authentication, mysql, PHP, Security</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/577/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Jan. 15th, 2007  5:30 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/577/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Idlemind/" title="Helper">Idlemind</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Authentication">Authentication</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Security">Security</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/577/comments/">8 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 14
			<p>MySQL 5.x Stored Routines, PHP Session Values, a little CSS oh my!  Complex to set up but easy to impliment.  Geared toward security, simplicity (of use) and convenience.</p>
		]]>
	</description>
</item><item>
	<title>PHP Image Gallery</title>
	<link>http://www.bytemycode.com/snippets/snippet/568/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/568/comments/</comments>
	<pubDate>Sun, 24 Dec 2006 19:10:13 +0000</pubDate>
	<dc:creator>bhmahler</dc:creator>
	<category>HTML, JavaScript, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/568/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Dec. 24th, 2006  7:10 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/568/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/bhmahler/" title="Beginner">bhmahler</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/HTML">HTML</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/568/comments/">4 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 24
			<p>This is a PHP and JavaScript Image gallery that I created.  There are 2 uses for this.  <br />1.) You can save it as index.php and place in a folder containing images and it will display the images in that folder. <br />Example: <br />place index.php in images/folder<br />http://yoursite.com/images/folder/ <br />This will display all images in that folder<br /><br />2.) Pass in the path to the folder to display in the url<br />Example:<br />Save as imagegallery.php<br />http://yoursite.com/imagegallery.php?path=images/folde</p>
		]]>
	</description>
</item><item>
	<title>Anonymous Proxy check</title>
	<link>http://www.bytemycode.com/snippets/snippet/564/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/564/comments/</comments>
	<pubDate>Tue, 19 Dec 2006 15:47:39 +0000</pubDate>
	<dc:creator>RaX</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/564/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Dec. 19th, 2006  3:47 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/564/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/RaX/" title="Helper">RaX</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/564/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>This routine checks a client's IP address against a few open lists of blacklisted IP addresses, returns TRUE if the ip is a known proxy.</p>
		]]>
	</description>
</item><item>
	<title>PHP Thumbnail Image and save file</title>
	<link>http://www.bytemycode.com/snippets/snippet/562/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/562/comments/</comments>
	<pubDate>Tue, 12 Dec 2006 21:14:56 +0000</pubDate>
	<dc:creator>adorkable81</dc:creator>
	<category>PHP, Thumbnail</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/562/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Dec. 12th, 2006  9:14 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/562/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/adorkable81/" title="Beginner">adorkable81</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Thumbnail">Thumbnail</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/562/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 16
			<p>Ok, another thumbnail PHP function. This function support resize of JPEG and GIF, and resize with aspect ratio (set $THUMBX=0 if you wish it is resized with the Height, $THUMBY=0 if blah blah blah, you get the point)</p>
		]]>
	</description>
</item><item>
	<title>Calculate date range</title>
	<link>http://www.bytemycode.com/snippets/snippet/552/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/552/comments/</comments>
	<pubDate>Mon, 04 Dec 2006 23:03:50 +0000</pubDate>
	<dc:creator>jdenton</dc:creator>
	<category>"date convert", PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/552/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Dec. 4th, 2006  11:03 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/552/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/jdenton/" title="Helper">jdenton</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22date+convert%22">"date convert"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/552/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 10
			<p>Give this little function a start date and number of days and it will calculate the end date.</p>
		]]>
	</description>
</item><item>
	<title>Advanced ADODB Pager</title>
	<link>http://www.bytemycode.com/snippets/snippet/544/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/544/comments/</comments>
	<pubDate>Sun, 19 Nov 2006 12:30:50 +0000</pubDate>
	<dc:creator>pcolella</dc:creator>
	<category>PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/544/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Nov. 19th, 2006  12:30 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/544/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/pcolella/" title="Beginner">pcolella</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/544/comments/">2 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>This is a rewrite of a basic ADODB / PHP Database pager. This pager has some very slick search, sort, and display configuration options. Modifications and improvements are very welcome. Thus I am sharing this code.<br /><br />A basic example for using this pager would be as follows:<br /><br />// Check class code for CSS styles used<br />require_once ('class.init.php');<br /><br />// SQL Statement<br />$sql = 'SELECT table1.field1, table1.field2, table1.field3 FROM table1';<br /><br />// Field Labels<br />$label_arr = array ( <br />	'field1' => 'Field 1 Heading',<br />	'field2' => 'Field 2 Heading',<br />	'field3' => 'Field 3 Heading'<br />);<br /><br />// Hidden Fields<br />$vsel_arr = array (<br />	'field3' => 0 // don't display field3 unless requested by the user<br />);<br /><br />$sort_arr = array (<br />	'field1' => 'asc' // sort by field1 ascending order (asc) or (desc)<br />);<br /><br />// Config array<br />$config = array (<br />	'db' => &$dbconn, // open ADODB connection<br />	'sql' => $sql, // String of sql<br />	'id' => 'table1_pager', // pager id for session variables<br />	'label_arr' => $label_arr, // field heading array<br />	'vsel_arr' => $vsel_arr, // fields to hide<br />	'extra_param' => '', // extra paramaters to pass with edit, delete, add anchors<br />	'form_width' => '100%', // table with<br />	'form_title' => 'Table 1', // table title<br />	'edit_anchor' => 'Edit', // link to edit<br />	'del_anchor' => 'Del', // link to delete<br />	'add_anchor' => 'Add', // link to add<br />	'print_anchor' => 'Print', // link to print<br />	'header_view' => true, // no function at this time<br />	'search_view' => true, // no function at this time<br />	'pk' => array ('field1' => true), // primary key field<br />	'sort_arr' => $sort_arr, // sort field array<br />);<br /><br />// create object then render it ...<br />$_pager = new pager($config); // create instance<br />echo $_pager->render(25); // render output<br /></p>
		]]>
	</description>
</item><item>
	<title>Sectionalize Text</title>
	<link>http://www.bytemycode.com/snippets/snippet/540/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/540/comments/</comments>
	<pubDate>Thu, 16 Nov 2006 05:30:37 +0000</pubDate>
	<dc:creator>Celebhir</dc:creator>
	<category>characters, PHP, split, String</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/540/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Nov. 16th, 2006  5:30 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/540/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Celebhir/" title="Helper">Celebhir</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/characters">characters</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/split">split</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/String">String</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/540/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 9
			<p>Function that splits a given string into sections based on the allowed length for a section. Does not split words up. Splits string on Space character (can be set to another character)</p>
		]]>
	</description>
</item><item>
	<title>DES Encryption</title>
	<link>http://www.bytemycode.com/snippets/snippet/538/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/538/comments/</comments>
	<pubDate>Wed, 15 Nov 2006 12:59:36 +0000</pubDate>
	<dc:creator>ecliptic</dc:creator>
	<category>"Email Address", "VB.NET"</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/538/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Wed. Nov. 15th, 2006  12:59 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/538/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_beginner.gif" align="middle" class="icon" alt="Beginner" /> <a href="http://www.bytemycode.com/members/member/ecliptic/" title="Beginner">ecliptic</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/%22Email+Address%22">"Email Address"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22VB.NET%22">"VB.NET"</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/538/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 10
			<p>A simple snippet for using single pass DES encryption. Uses the .NET framework functions. Enjoy!</p>
		]]>
	</description>
</item><item>
	<title>File splitter</title>
	<link>http://www.bytemycode.com/snippets/snippet/536/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/536/comments/</comments>
	<pubDate>Tue, 14 Nov 2006 13:24:48 +0000</pubDate>
	<dc:creator>shachi</dc:creator>
	<category>File, PHP, splitter</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/536/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Nov. 14th, 2006  1:24 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/536/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/shachi/" title="Scripter">shachi</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/File">File</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/splitter">splitter</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/536/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 8
			<p>This function simply splits a file based on the splitter supplied and returns an array with the values. It's pretty much like the file() function. This script could be helpful in section editings.</p>
		]]>
	</description>
</item><item>
	<title>Upload Class</title>
	<link>http://www.bytemycode.com/snippets/snippet/528/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/528/comments/</comments>
	<pubDate>Thu, 09 Nov 2006 02:11:20 +0000</pubDate>
	<dc:creator>Nico</dc:creator>
	<category>Class, PHP, transload, upload</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/528/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Nov. 9th, 2006  2:11 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/528/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Nico/" title="Helper">Nico</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Class">Class</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/transload">transload</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/upload">upload</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/528/comments/">6 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 33
			<p>Simple upload class with features such as <br /><br />- Upload of multiple files at the same time.<br />- Filtering uploads by size and extension.<br />- Uploads to configurable subdirs based on date.<br />- Automatic file renaming if a file with the same name exists.<br />- Transloading. Copying files from a different host to the local host. (Like Imageshack does)<br />- And more...</p>
		]]>
	</description>
</item><item>
	<title>PHP/MySQL Authentication Scheme</title>
	<link>http://www.bytemycode.com/snippets/snippet/525/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/525/comments/</comments>
	<pubDate>Tue, 07 Nov 2006 11:06:35 +0000</pubDate>
	<dc:creator>kahotep</dc:creator>
	<category>mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/525/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Nov. 7th, 2006  11:06 AM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/525/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/kahotep/" title="Helper">kahotep</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/525/comments/">6 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> -8
			<p>This class is a simple authentication scheme which makes it easy to add authentication to any page by including one class and adding one table to your MySQL database.<br /><br />The following functions are employed by this authentication class:<br /><br /><b>auth()</b><br /><blockquote>this is the default constructor; it automatically checks for the POST vars "username" and "password", it also checks to see if the user passed the GET variable "logout", which would prompt it to set the authentication status to un-authenticated.</blockquote><br /><b>is_authorized()</b><br /><blockquote>Checks the SESSION variable "authorized" and returns true or false depending on that variable.</blockquote><br /><b>mysql_bind()</b><br /><blockquote>This is automatically called by the constructor each time the class is instantiated and $_POST['username'] and $_POST['password'] are present.  It queries the db for a valid username and MD5 encoded password. </blockquote><br /><b>user_create($username,$email,$password) </b><br /><blockquote>Creates a user, if the username is available, and creates an MD5 hash based on username, password and date, to be used in the "activation" of the account.</blockquote><br /><b>user_activation_message($username)</b><br /><blockquote>Sends the custom activation message to the email address for the username specified</blockquote><br /><b>user_activation($activation_hash)</b><br /><blockquote>Checks to see if the activation hash is valid, if it is, the activation_hash variable is set to NULL, thus signifying that the account is active.</blockquote><br /><b>user_password_change($username,$password_old,$password_new)</b><br /><blockquote>Quick and easy way to change the user's password with one function call.</blockquote> <br /><b>user_logout()</b><br /><blockquote>Sets the authorization status in $_SESSION['authorized'] to FALSE</blockquote><br /><b>is_username_available( $username )</b><br /><blockquote>Returns TRUE or FALSE depending on whether or not the username is free.</blockquote></p>
		]]>
	</description>
</item><item>
	<title>Loading fresh JS code</title>
	<link>http://www.bytemycode.com/snippets/snippet/500/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/500/comments/</comments>
	<pubDate>Sun, 29 Oct 2006 12:52:29 +0000</pubDate>
	<dc:creator>SCoon</dc:creator>
	<category>JavaScript, PHP, Web</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/500/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Oct. 29th, 2006  12:52 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/500/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_scripter.gif" align="middle" class="icon" alt="Scripter" /> <a href="http://www.bytemycode.com/members/member/SCoon/" title="Scripter">SCoon</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/JavaScript">JavaScript</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Web">Web</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/500/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 11
			<p>Enforce loadig fresh script code for the external javascript files. Compatible with HTTP 1.0.</p>
		]]>
	</description>
</item><item>
	<title>Zip Codes</title>
	<link>http://www.bytemycode.com/snippets/snippet/489/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/489/comments/</comments>
	<pubDate>Tue, 24 Oct 2006 20:13:13 +0000</pubDate>
	<dc:creator>dohpaz</dc:creator>
	<category>mysql, mysqli, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/489/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Oct. 24th, 2006  8:13 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/489/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/dohpaz/" title="Helper">dohpaz</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/mysql">mysql</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/mysqli">mysqli</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/489/comments/">4 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 21
			<p>If you've ever wanted to build an application that can both find the distance between two zip codes, and find zip codes within a specific radius of another zip code, then this is the snippet for you.<br /><br />I've tried to build this before using PHP4 and MySQL 4 and have found it to be painfully slow for a one-user connection over a Local Area Network (LAN). So, before you continue reading, I must make it abundantly clear that this method <i>requires</i> <b>PHP 5</b> and <b>MySQL 5</b>.<br /><br />This is because in PHP5, we will need the MySQL-Improved interfaces, and in MySQL 5, we will need functions and procedures.<br /><br />Using functions and procedures in MySQL puts the weight of the calculations on MySQL, where they will run hundreds of times faster than if PHP were to attempt to do the work. In addition, using functions and procedures is still hundreds of times faster than carefully crafted SQL statements (one benchmark took over 10 seconds using a WHERE clause, while the function + procedure method took around .12 seconds--note the dot).<br /><br />Since I am not a mathematician by trade, I found the necessary calculations using Google.<br /><br />For the "Great Circle Distance" formula, I used <a href='http://www.meridianworlddata.com/Distance-Calculation.asp' target="_blank">Meridian Word Data</a>'s website. For the radius finder, I used another that unfortunately I do not have off the top of my head right now. I will look for it again and repost it for proper accreditation.<br /><br />For the zip code database, I am using the free zip code database from <a href='http://www.cfdynamics.com/cfdynamics/zipbase/index.cfm' target="_blank">CFDynamics</a>.<br /><br />Below, you will find the database and table schema, the functions and procedures, and also a demo PHP script to see all of this put into action. As a courtesy, you may download a dump of this database from <a href='http://www.kennethpaul.com/zipcodes-2006-10-24.sql.bz2' target="_blank">my website</a>. It's uncompressed size is 3.4M, and it's compressed size is 537K. The checksum is available <a href='http://www.kennethpaul.com/zipcodes-2006-10-24.sql.asc' target="_blank">here</a>.<br /><br />Please leave me comments, suggestions, questions, and/or rants about this snippet. I feel this is a very useful bit of code, and hope that others out there may find as much use from it as I will be.</p>
		]]>
	</description>
</item><item>
	<title>Resize Image Function</title>
	<link>http://www.bytemycode.com/snippets/snippet/485/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/485/comments/</comments>
	<pubDate>Mon, 23 Oct 2006 22:48:31 +0000</pubDate>
	<dc:creator>jdenton</dc:creator>
	<category>GD, gif, images, jpeg, PHP, png, Resize</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/485/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 23rd, 2006  10:48 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/485/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/jdenton/" title="Helper">jdenton</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/GD">GD</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/gif">gif</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/images">images</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/jpeg">jpeg</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/png">png</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Resize">Resize</a>			<br />
			<img src="http://www.bytemycode.com/img/icon_comments.gif" align="middle" class="icon" alt="Comments" /> <a href="http://www.bytemycode.com/snippets/snippet/485/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 5
			<p>The resize_image function allows you to resize a GIF, JPEG or PNG file to any dimension you wish and put an optional black border around the image.  Here's an explanation of the arguements:<br /><br />$image_path:  The complete path to the image to be resized<br /><br />$max_width: Maximum width of the resized image. Leave 0 if you want to specify only the height and have the width auto-scale.<br /><br />$max_height: Maximum height of the resized image. Leave 0 if you want to specify only the width and have the height auto-scale.<br /><br />$file_prefix: This will prepend a string onto the resized image filename. If you want to create a thumbnail image and keep the original, set $file_prefix = 'thumb'.<br /><br />$dir:  Allows you to save the resized image to a sub directory under the $image_path directory. If you want to save thumbnail images to images/thumbs, set $dir = 'thumbs'.<br /><br />$border: boolean, 1 = border, 0 = no border<br /><br />$mime:  Image mime type. (image/jpeg, image/gif, image/png)</p>
		]]>
	</description>
</item><item>
	<title>daysBetweenDates</title>
	<link>http://www.bytemycode.com/snippets/snippet/484/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/484/comments/</comments>
	<pubDate>Mon, 23 Oct 2006 22:19:00 +0000</pubDate>
	<dc:creator>jdenton</dc:creator>
	<category>Calendar, Date, days, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/484/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 23rd, 2006  10:19 PM			<br />
			<img src="http://www.bytemycode.com/img/icon_revision.gif" align="middle" class="icon" alt="Revision" /> <a href="http://www.bytemycode.com/snippets/snippet/484/revisions/">1</a>
			<br />
			<img src="http://www.bytemycode.com/img/rank_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/jdenton/" title="Helper">jdenton</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_tag.gif" align="middle" class="icon" alt="Tags" /> <a href="http://www.bytemycode.com/tags/tag/Calendar">Calendar</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/Date">Date</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/days">days</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>			<br />
			<img src="http://w