<?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 parse_url</title>
		<link>http://www.bytemycode.com</link>
		<description>Snippets for this tag.</description>
		<pubDate>Fri, 16 May 2008 19:15:03 +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>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_helper.gif" align="middle" class="icon" alt="Helper" /> <a href="http://www.bytemycode.com/members/member/Fordiman/" title="Helper">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" /> 2
			<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>
	</channel>
</rss>