PHPackages                             funkybunch/simple-http-router - 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. [API Development](/categories/api)
4. /
5. funkybunch/simple-http-router

ActiveProject[API Development](/categories/api)

funkybunch/simple-http-router
=============================

A simple HTTP router written in PHP. Use this to better manage routing for APIs and server-side web routing.

v1.1.0(7y ago)021[1 issues](https://github.com/funkybunch/Simple-HTTP-Router/issues)MITPHPPHP &gt;=7.0CI failing

Since Feb 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/funkybunch/Simple-HTTP-Router)[ Packagist](https://packagist.org/packages/funkybunch/simple-http-router)[ RSS](/packages/funkybunch-simple-http-router/feed)WikiDiscussions master Synced 2mo ago

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

*2020 Update:* PHP will forever have a special place in my heart, but its 2020 and I have moved onto other projects. As such this repository will no longer be maintained or updated. This repo and code will remain available for anyone to use, fork, modify to your heart's content, but should be considered "No longer supported".

Simple HTTP Router
==================

[](#simple-http-router)

[![Build Status](https://camo.githubusercontent.com/2bd715d82a00888131e6146cd9fc666437ae392864a6f90c40d842c47840bae6/68747470733a2f2f7472617669732d63692e6f72672f66756e6b7962756e63682f53696d706c652d485454502d526f757465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/funkybunch/Simple-HTTP-Router)

A simple router for HTTP requests written in PHP. Simple HTTP Router allows you to have a single point of entry for your web application or API and explicitly call different functions based on the HTTP `REQUEST_METHOD` and `REQUEST_URI`.

Installation
------------

[](#installation)

#### Simplest (Composer)

[](#simplest-composer)

The quickest way to get up and running is to use [Composer](https://github.com/composer/composer).

1. Once you have Composer installed, initialize it in your root project directory using: ```
    $ composer init
    ```
2. Now you're all ready to start adding some dependencies. To install Simple HTTP Router: ```
    $ composer require funkybunch/simple-http-router
    ```

That's it! Just make sure to `autoload` at the top of your code.

```
