<?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: Snippets for the ffxfiend</title>
		<link>http://www.bytemycode.com</link>
		<description>Snippets for this member.</description>
		<pubDate>Sat, 11 Oct 2008 23:24:22 +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>Regex functino to validate a URL</title>
	<link>http://www.bytemycode.com/snippets/snippet/404/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/404/comments/</comments>
	<pubDate>Thu, 28 Sep 2006 15:43:49 +0000</pubDate>
	<dc:creator>ffxfiend</dc:creator>
	<category>"php", PHP, phpcode, RegExp</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/404/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Thu. Sep. 28th, 2006  3:43 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/404/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/ffxfiend/" title="Helper">ffxfiend</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/%22php%22">"php"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/phpcode">phpcode</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/RegExp">RegExp</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/404/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> -11
			<p>This is a faily simple function to validate a URL being passed into your scripts. It will allow for http, https, and ftp. The beginning www. of a URL is optional as well. It will also validate if you have an IP address in place of the domain name. I'm sure this can be improved upon as this is my first attempt at regular expressions but it has worked good for me so far. Please comment or improve if your able. <br /><br />Thanks!</p>
		]]>
	</description>
</item><item>
	<title>Generate a random ID</title>
	<link>http://www.bytemycode.com/snippets/snippet/387/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/387/comments/</comments>
	<pubDate>Fri, 22 Sep 2006 07:06:40 +0000</pubDate>
	<dc:creator>ffxfiend</dc:creator>
	<category>"Random Generation", PHP, phpcode</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/387/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Fri. Sep. 22nd, 2006  7: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/387/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/ffxfiend/" title="Helper">ffxfiend</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/%22Random+Generation%22">"Random Generation"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/PHP">PHP</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/phpcode">phpcode</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/387/comments/">5 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 26
			<p>This is a simple function to generate a random ID of letters and numbers however long you want. All you do is pass it how many parts you want and then how many pieces(chars/numbers) per part you want. <br /><br />I hope you enjoy <img src="http://www.bytemycode.com/img/wysiwyg/emo-smile.gif" /></p>
		]]>
	</description>
</item><item>
	<title>newlines and nl</title>
	<link>http://www.bytemycode.com/snippets/snippet/373/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/373/comments/</comments>
	<pubDate>Mon, 18 Sep 2006 19:26:02 +0000</pubDate>
	<dc:creator>ffxfiend</dc:creator>
	<category>mysql, PHP</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/373/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Sep. 18th, 2006  7:26 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/373/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/ffxfiend/" title="Helper">ffxfiend</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/373/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 10
			<p>Here is a pair of function to use in combination. The first one will change newlines into  tags to store into a database. The second one does the reverse so you can edit the content of the database without having the  tags show when you edit the content. If you can find improvements or have comments please let me know <img src="http://www.bytemycode.com/img/wysiwyg/emo-bigsmile.gif" /></p>
		]]>
	</description>
</item><item>
	<title>Resize an Image</title>
	<link>http://www.bytemycode.com/snippets/snippet/365/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/365/comments/</comments>
	<pubDate>Sun, 17 Sep 2006 09:05:55 +0000</pubDate>
	<dc:creator>ffxfiend</dc:creator>
	<category>"images", PHP, phpcode</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/365/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Sep. 17th, 2006  9:05 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/365/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/ffxfiend/" title="Helper">ffxfiend</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/%22images%22">"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/phpcode">phpcode</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/365/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 11
			<p>You can use this function to dynamically generate html "width/height" for use with displaying a thumbnail image usingthe original image. This will help save in making dup images just for display as a thumbnail.<br /><br />It takes two arguments, the path to where the image is stored and the desired width or height.<br /><br />Please comment or improve this code <img src="http://www.bytemycode.com/img/wysiwyg/emo-bigsmile.gif" />.</p>
		]]>
	</description>
</item>
	</channel>
</rss>