Home

Awesome

HttpAdapter

This PHP 5.3+ library provides you simple HTTP adapters.

Build Status Coverage Status Latest Stable Version Total Downloads SensioLabsInsight

Installation

This library can be found on Packagist. The recommended way to install this is through composer.

Edit compose.json and add:

{
    "require": {
        "toin0u/http-adapter": "~1.0"
    }
}

And install dependecies:

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Available adapters

Usage

<?php

require 'vendor/autoload.php';

$adapter = new HttpAdapter\CurlHttpAdapter;
$url     = 'http://ifconfig.me/ip';

printf('IP: %s', $adapter->getContent($url)); // IP: 127.0.0.1

Contributing

Please see CONTRIBUTING for details.

Credits

Acknowledgment

This set of adapters comes originally from the Geocoder PHP library.

Support

Please open an issues in github

License

HttpAdapter is released under the MIT License. See the bundled LICENSE file for details.