PHPackages                             outglow/httpbase - 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. outglow/httpbase

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

outglow/httpbase
================

Outglow PSR-0 Http request handler

04PHP

Since Mar 23Pushed 13y ago1 watchersCompare

[ Source](https://github.com/hazbo/httpbase)[ Packagist](https://packagist.org/packages/outglow/httpbase)[ RSS](/packages/outglow-httpbase/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

### This project is no longer in development.

[](#this-project-is-no-longer-in-development)

Http Base
=========

[](#http-base)

- PSR-0 compliant
- Easy to use
- Stable

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

[](#installation)

Add `outglow/httpbase` to your composer.json file

```
{
    "require" : {
        "outglow/httpbase" : "dev-master"
    }
}

```

Then run: `php composer.phar install`(NOTE: An update may be required first)

Usage
-----

[](#usage)

### Receiving requests

[](#receiving-requests)

Http Base allows you to look at `GET` and `POST` requests, and deal with them in an elegant manner. Below is an example of how you set it up:

```
include('vendor/autoload.php');

use Outglow\Component\HttpBase\HttpBase;

$http = new HttpBase();

```

We can now use the `$http` variable to access data sent using either a `GET` or `POST` request. Let's say `name` has been passed into our query string

```
http://example.com/index.php?name=Harry

```

We can access `name` like so:

```
$name = $http->query->get('name');

```

We can also do the same if name has been sent using a `POST` request:

```
$name = $http->query->post('name');

```

It even allows us to access all `POST` or `GET` variables by not passing anything through:

```
$getVars = $http->query->get();

```

The same will work with `POST`.

### Making requests

[](#making-requests)

HttpBase makes good use of curl, and callbacks. Below is an example of how we could make a simple `GET` request:

```
$response = $http->make->get('http://graph.facebook.com/zuck');

```

This will return:

```
{
   "id": "4",
   "name": "Mark Zuckerberg",
   "first_name": "Mark",
   "last_name": "Zuckerberg",
   "link": "https://www.facebook.com/zuck",
   "username": "zuck",
   "gender": "male",
   "locale": "en_US"
}

```

We can do the same using `POST`, `HEAD`, `PUT` and `DELETE` requests, and you can also add any params for the request as an array:

```
$http->make->get($url, array());
$http->make->post($url, array());
$http->make->head($url, array());
$http->make->put($url, array());
$http->make->delete($url, array());

```

### Extended

[](#extended)

HttpBase makes good use of callbacks. This involves having an option third param and can be used like so:

```
$http->make->get('http://graph.facebok.com/zuck', array(), function($data) {
  print_r(json_decode($data), true);
});

```

In the example above, we have make a request to Facebook, and used `print_r` to out put the response in the form of an array inside of the function. The `$data` variable is passed through. This is just our response from the Http request.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4755952c71b2d702aaaf3799c3e9b6cbf30f2d1fb959e7de040b0d8e3b5c85ae?d=identicon)[hazbo](/maintainers/hazbo)

### Embed Badge

![Health badge](/badges/outglow-httpbase/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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