PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_URL » Manual

Provides an easy parsing of URLs

Net_URL Constructor

Net_URL Constructor – Instantiating Net_URL

Synopsis

require_once 'Net/URL.php';

string Net_URL ( string $url = null , boolean $useBrackets = true )

Description

Instantiates a new Net_URL object

Parameter

Example

Using Net_URL

<?php
require_once 'Net/URL.php';
$url = new Net_URL();
print_r($url->querystring);
?>

Net_URL::setOption

Net_URL::setOption – Setting options with Net_URL

Synopsis

require_once 'Net/URL.php';

string setOption ( string $optionName , string $value )

Description

Setting a Net_URL option

Parameter

List of options
Name Description
encode_query_keys This will encode the query keys if set to true. By default set to false.

Example

Using Net_URL

<?php
require_once 'Net/URL.php';
$url = new Net_URL;
$url->setOption('encode_query_keys', true);
print_r($url->querystring);
?>