* * @category Networking * @package Net_URL2 * @author Some Pear Developers * @license https://spdx.org/licenses/BSD-3-Clause BSD-3-Clause * @link https://tools.ietf.org/html/rfc3986 */ /** * This example will decode the url given and display its * constituent parts. */ error_reporting(E_ALL | E_STRICT); require_once 'Net/URL2.php'; $url = new Net_URL2('https://www.example.com/foo/bar/index.php?foo=bar'); ?>
Protocol...: protocol; ?>

Username...: user; ?>

Password...: pass; ?>

Server.....: host; ?>

Port.......: port; ?>

File/path..: path; ?>

Querystring: querystring); ?>

Anchor.....: anchor;?>

Full URL...: getUrl(); ?>

Resolve path (/.././/foo/bar/joe/./././../jabba): resolve('/.././/foo/bar/joe/./././../jabba'); ?>