Login   Register  
PHP Classes
elePHPant
Icontem

File: README

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Glen Scott  >  URL Normalizer  >  README  >  Download  
File: README
Role: Documentation
Content type: text/plain
Description: README
Class: URL Normalizer
Normalize URLs according to RFC 3986
Author: By
Last change:
Date: 2011-02-04 07:59
Size: 456 bytes
 

Contents

Class file image Download
Syntax based normalization of URI's

This normalises URI's based on the specification RFC 3986 
http://www.apps.ietf.org/rfc/rfc3986.html

Example usage:
<code>
require_once 'URLNormalizer.php';

$url = 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d';
$un = new URLNormalizer();
$un->setUrl( $url );
echo $un->normalize();

// result: "example://a/b/c/%7Bfoo%7D"
</code>

TODO:

Add further scheme-based normalization steps, as detailed in section 6.2.3 of the RFC.