ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

7
Date Submitted Thu. Mar. 6th, 2008 3:09 AM
Revision 1
Scripter Fordiman
Tags JavaScript | parse_url | PHP
Comments 0 comments
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.

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.

Additional: if first argument is present, will break the querystring up into name/value pairs, unescaped, and return that instead of the raw querystriing.