HTTP: guaranix URL Cesar D. Rodas (contact me)
This class can be used to compare URLs and compute relative URIs.
It determines if two URLs are from the same site. If so, it returns the URI of the second relative to the first. Otherwise it returns the second absolute URL.