PHPackages                             hashbang/urlopts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. hashbang/urlopts

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hashbang/urlopts
================

Nicer looking URLs for key/value pairs for REST style operations

v1.2.0(12y ago)030MITPHPPHP &gt;=5.0.0

Since Mar 14Pushed 12y ago1 watchersCompare

[ Source](https://github.com/hash-bang/URLopts)[ Packagist](https://packagist.org/packages/hashbang/urlopts)[ Docs](https://github.com/hash-bang/URLopts)[ RSS](/packages/hashbang-urlopts/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

URLopts - CodeIgniter pretty URL option processing
==================================================

[](#urlopts---codeigniter-pretty-url-option-processing)

This library provies a simple way to setup nice looking URLs.

URLopts encodes various parameters into the URL string itself similar to a normal GET parameter but in a neater way.

For example the following URL shows the various components of a neatened URL:

```
http://website.com/controller/function/parameter1/value1/parameter2/value2/parameter3/value3

```

URLopts provides a library for constructing and reading back URLs such as this within a CodeIgniter controller.

Installation
============

[](#installation)

Download this repo and copy into your application directory.

Alternatively, install with [Composer](http://getcomposer.org).

Examples
========

[](#examples)

CodeIgniter Controller
----------------------

[](#codeigniter-controller)

Here is a simple User controler which is showing a list of users.

This function allows you to pass various parameters in the URL to filter the user list.

For example the following URLs can be used

- `http://website.com/users/list` - The basic list - show everything
- `http://website.com/users/list/page/5` - Move to page 5 (e.g. if using pagination)
- `http://website.com/users/list/newsletter/yes` - Only show users who are signed up to the newsletter
- `http://website.com/users/list/role/admin` - Only show 'admin' users
- `http://website.com/users/list/recent/yes` - Only show users who have logged in recently
- `http://website.com/users/list/page/5/newsletter/yes` - A combination of only showing page 5 + users subscribed to the newsletter
- `http://website.com/users/list/role/admin/recent/yes` - Another combination showing only 'admin' users who have loggged in recently
- All of the above can be combined in any combination.

The example CodeIgniter controller would look something like this:

```

```

The above sets 'foo' to 'bar' in the URL. If the current URL was '' the above would return ''.

```

```

The above sets 'foo' to '1' in the URL. If the current URL was '' the above would return ''.

```

```

The above removes 'foo' from the URL. If the current URL was '' the above would return ''.

An alternate syntax is also available:

```

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

3

Last Release

4420d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8587289?v=4)[hashbang](/maintainers/hashbang)[@hashbang](https://github.com/hashbang)

---

Top Contributors

[![hash-bang](https://avatars.githubusercontent.com/u/624527?v=4)](https://github.com/hash-bang "hash-bang (15 commits)")

---

Tags

urlrest

### Embed Badge

![Health badge](/badges/hashbang-urlopts/health.svg)

```
[![Health](https://phpackages.com/badges/hashbang-urlopts/health.svg)](https://phpackages.com/packages/hashbang-urlopts)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k789.4M1.8k](/packages/symfony-routing)[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)[league/fractal

Handle the output of complex data structures ready for API output.

3.5k64.1M476](/packages/league-fractal)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
