<?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>Fri, 05 Dec 2008 07:47:28 +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>fopen</title>
	<link>http://www.bytemycode.com/snippets/snippet/862/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/862/comments/</comments>
	<pubDate>Tue, 04 Nov 2008 23:16:31 +0000</pubDate>
	<dc:creator>mcheung63</dc:creator>
	<category>"php"</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/862/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Tue. Nov. 4th, 2008  11:16 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/862/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/mcheung63/" title="Beginner">mcheung63</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>			<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/862/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>Note: Different operating system families have different line-ending conventions. When you write a text file and want to insert a line break, you need to use the correct line-ending character(s) for your operating system. Unix based systems use \n as the line ending character, Windows based systems use \r\n  as the line ending characters and Macintosh based systems use \r as the line ending character.<br />If you use the wrong line ending characters when writing your files, you might find that other applications that open those files will "look funny".<br />Windows offers a text-mode translation flag ('t') which will transparently translate \n to \r\n when working with the file. In contrast, you can also use 'b' to force binary mode, which will not translate your data. To use these flags, specify either 'b' or 't' as the last character of the mode parameter.<br />The default translation mode depends on the SAPI and version of PHP that you are using, so you are encouraged to always specify the appropriate flag for portability reasons. You should use the 't' mode if you are working with plain-text files and you use \n to delimit your line endings in your script, but expect your files to be readable with applications such as notepad. You should use the 'b' in all other cases.<br />If you do not specify the 'b' flag when working with binary files, you may experience strange problems with your data, including broken image files and strange problems with \r\n characters.</p>
		]]>
	</description>
</item><item>
	<title>Resizing images depending on client's dimensions</title>
	<link>http://www.bytemycode.com/snippets/snippet/731/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/731/comments/</comments>
	<pubDate>Sat, 22 Sep 2007 09:45:50 +0000</pubDate>
	<dc:creator>el_nokio</dc:creator>
	<category>"auto", "client", "image", "javascript", "resize"</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/731/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sat. Sep. 22nd, 2007  9:45 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/731/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/el_nokio/" title="Helper">el_nokio</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/%22auto%22">"auto"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22client%22">"client"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22image%22">"image"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22javascript%22">"javascript"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22resize%22">"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/731/comments/">0 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 0
			<p>This is a very simple javascript - script, which can help us to <b>resize</b> any image (picture) included on our web-page "automatecally" by getting the vis&#953;tor's(client side) dimensions <b>Height + Width</b> and so changing the image  proportionally .</p>
		]]>
	</description>
</item><item>
	<title>RegEX Email Validatoin</title>
	<link>http://www.bytemycode.com/snippets/snippet/440/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/440/comments/</comments>
	<pubDate>Mon, 09 Oct 2006 08:44:35 +0000</pubDate>
	<dc:creator>shortkid422</dc:creator>
	<category>"Address", "Email", "Expressions", "php", "Regular"</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/440/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Mon. Oct. 9th, 2006  8: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/440/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/shortkid422/" title="Beginner">shortkid422</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/%22Address%22">"Address"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22Email%22">"Email"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22Expressions%22">"Expressions"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22php%22">"php"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22Regular%22">"Regular"</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/440/comments/">3 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 8
			<p>This will return a boolean (true/false) if the email address is valid or not.</p>
		]]>
	</description>
</item><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>PHP/MySQL/LDap authentication</title>
	<link>http://www.bytemycode.com/snippets/snippet/392/</link>
	<comments>http://www.bytemycode.com/snippets/snippet/392/comments/</comments>
	<pubDate>Sun, 24 Sep 2006 17:23:27 +0000</pubDate>
	<dc:creator>kahotep</dc:creator>
	<category>"authentication", "ldap", "mysql", "php"</category>
	<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/392/</guid>
	<description>
		<![CDATA[

			<img src="http://www.bytemycode.com/img/icon_calendar.gif" align="middle" class="icon" alt="Date Submitted" /> Sun. Sep. 24th, 2006  5: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/392/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/%22authentication%22">"authentication"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22ldap%22">"ldap"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22mysql%22">"mysql"</a>&nbsp;|&nbsp;<a href="http://www.bytemycode.com/tags/tag/%22php%22">"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/392/comments/">1 comments</a>
			<br />
			<img src="http://www.bytemycode.com/img/icon_ranking.gif" align="middle" class="icon" alt="Ranking" /> 6
			<p>The following program was written for my company's time keeping system which utilizes an LDAP database for authentication and a MySQL database for time-keeping, account access control, etc.<br /><br />If a user has >= 5 unsuccessful logins, it locks the account for 5 minutes.  Once a successful LDAP bind has occured, the $_SESSION vars are set and the authorization process is bypassed until the user logs out or the session expires.</p>
		]]>
	</description>
</item>
	</channel>
</rss>