PHPackages                             mslib/remote-host - 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. mslib/remote-host

ActiveLibrary

mslib/remote-host
=================

General Ms library to send requests to an API

1.2.0(11y ago)132GLP v2PHP

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mslib/remote-host)[ Packagist](https://packagist.org/packages/mslib/remote-host)[ RSS](/packages/mslib-remote-host/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (4)Versions (7)Used By (0)

**REMOTEHOST LIBRARY**
======================

[](#remotehost-library)

This PHP library provides an easy way to send requests to Web APIs.

### System requirements

[](#system-requirements)

RemoteHost library requires PHP 5.3 or later.

#### PHP extensions

[](#php-extensions)

The following PHP extensions are required:

- PHP Curl;

For more information about how to install all required extensions, please refer to their online documentation.

### Dependencies

[](#dependencies)

The RemoteHost library is based on ZendFramework2. The following ZF2 modules are currently used (take a look at the composer.json for a full overview about all dependencies):

```
{
    "require": {
        "zendframework/zend-http": "2.*",
        "zendframework/zend-config": "2.*",
        "zendframework/zend-json": "2.*",
        "zendframework/zend-uri": "2.*"
    }
}
```

The library was ONLY tested for requests sent with the Curl library. For stability purposes, please make sure that all request objects configured with this library are an extension of 'Zend\\Http\\Client\\Adapter\\Curl' class (for more details about this class, please refer to the ZF2 documentation).

**INSTALLATION**
----------------

[](#installation)

Installation is a quick 3 step process:

1. Download RemoteHost using composer
2. Configure your api calls
3. Generate your Api implementation

### Step 1: Download RemoteHost using composer

[](#step-1-download-remotehost-using-composer)

Add RemoteHost in your composer.json:

```
{
    "require": {
        "mslib/remote-host": "dev-master"
    }
}
```

Now tell composer to download the library by running the command:

```
$ php composer.phar update mslib/remote-host
```

Composer will install the library to your project's `vendor/mslib/remote-host` directory.

### Step 2: Configure your api calls

[](#step-2-configure-your-api-calls)

Now that the RemoteHost library is available in your project (through composer, for example), you need to configure all required API actions that your application needs.

In order to do that, you have to create a PHP file containing an array with a given set of configuration keys and values. You will find here below the structure of such a file.

```
