PHPackages                             opensrs/osrs-toolkit-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. opensrs/osrs-toolkit-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

opensrs/osrs-toolkit-php
========================

OpenSRS PHP Toolkit

4.0.1(10y ago)7668.6k—7.1%72[16 issues](https://github.com/OpenSRS/osrs-toolkit-php/issues)[11 PRs](https://github.com/OpenSRS/osrs-toolkit-php/pulls)MITPHPCI failing

Since Jan 28Pushed 2y ago21 watchersCompare

[ Source](https://github.com/OpenSRS/osrs-toolkit-php)[ Packagist](https://packagist.org/packages/opensrs/osrs-toolkit-php)[ Docs](https://opensrs.com)[ RSS](/packages/opensrs-osrs-toolkit-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Official OpenSRS PHP Toolkit
============================

[](#official-opensrs-php-toolkit)

The purpose in building out these libraries is to help ease the implementation of the OpenSRS API. Not only does it give a starting point in developing an application to allow for quick integration, but also incorporates new communication markup languages such as JSON and YAML.

Support
-------

[](#support)

Our support team will be able to help with general connectivity issues outlined in: ()

If you find a bug in the sample provided with this toolkit, please contact OpenSRS Support with the XML output and response. We will not, however, be able to troubleshoot PHP configuration with your web host nor additional PHP code that you developed. Should you require assistance on those matters, please work with a website developer.

Requirements
------------

[](#requirements)

This PHP library currently supports data being passed in JSON and YAML (it is also being extended to pass data in XML and Array format as well).

The OpenSRS PHP Tookit requires:

- PHP 5
- OpenSSL
- PEAR:
- cURL: required for OMA
- php-curl: required for OMA -

NOTE: It's best to use the PHP 5.3+ as json\_encode and json\_decode are standard on that version and above. If an earlier version of PHP 5 is needed, the php-json libraries at  will be required.

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

[](#installation)

```
composer require opensrs/osrs-toolkit-php

```

Configuration
-------------

[](#configuration)

To configure your OpenSRS API settings, copy the sample config file [openSRS\_config.php.template](https://github.com/OpenSRS/osrs-toolkit-php/blob/develop/opensrs/openSRS_config.php.template) and modify with your own OpenSRS API settings. Be sure to require your config before using. For more details see the following section on Boostrapping.

For more detailed configuration information refer to ()

Bootstrapping
-------------

[](#bootstrapping)

You can bootstrap the OpenSRS toolkit by sourcing the composer autoloader, as well as your OpenSRS config file. For example if you saved your OpenSRS config file as config/openSRS\_config.php, you would bootstrap by running the following:

```
require_once('vendor/autoload.php');
require_once('config/openSRS_config.php');
```

Using the toolkit
-----------------

[](#using-the-toolkit)

```
require_once('vendor/autoload.php');
require_once('config/openSRS_config.php');

try {
    $request = new Request();
    $response = $request->process('array', $data);

    // dump raw results
    var_dump($response->resultRaw);

} catch (\OpenSRS\Exception $e){
    // handle exception(s)
}
```

Refer to the [OpenSRS API Documentation Page](http://www.opensrs.com/site/resources/documentation/api) for available requests &amp; attributes.

Backwards Compatibility
-----------------------

[](#backwards-compatibility)

For pre v4.0.0 users, backwards compatibility has been included so you can continue using the toolkit as you were before.

```
require_once ("your_root_path/opensrs/openSRS_loader.php");

$data = array (
    "func" => "lookupLookupDomain",
    "data" => array (
        "domain" => "google.com",
    )
);

$osrsHandler = processOpenSRS ("array", $data);

var_dump($osrsHandler);
```

Documentation
-------------

[](#documentation)

[OpenSRS API Documentation Page](http://www.opensrs.com/site/resources/documentation/api)

[OpenSRS/osrs-toolkit-php Wiki](https://github.com/OpenSRS/osrs-toolkit-php/wiki)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 77% 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 ~5 days

Total

2

Last Release

3735d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06f819514e3481979a44685cb0eb8041e50d997af3d95bc286662928c1ab32bd?d=identicon)[colincode](/maintainers/colincode)

---

Top Contributors

[![krisatkinson](https://avatars.githubusercontent.com/u/9163019?v=4)](https://github.com/krisatkinson "krisatkinson (255 commits)")[![ccampbell-tc](https://avatars.githubusercontent.com/u/40673449?v=4)](https://github.com/ccampbell-tc "ccampbell-tc (26 commits)")[![opensrs-pso](https://avatars.githubusercontent.com/u/3660698?v=4)](https://github.com/opensrs-pso "opensrs-pso (24 commits)")[![nikul-bc](https://avatars.githubusercontent.com/u/6470857?v=4)](https://github.com/nikul-bc "nikul-bc (7 commits)")[![yptAiNXi](https://avatars.githubusercontent.com/u/19979?v=4)](https://github.com/yptAiNXi "yptAiNXi (3 commits)")[![ryazwinski](https://avatars.githubusercontent.com/u/135253?v=4)](https://github.com/ryazwinski "ryazwinski (3 commits)")[![jstocks-tc](https://avatars.githubusercontent.com/u/6854453?v=4)](https://github.com/jstocks-tc "jstocks-tc (2 commits)")[![detain](https://avatars.githubusercontent.com/u/1364504?v=4)](https://github.com/detain "detain (2 commits)")[![Dayjo](https://avatars.githubusercontent.com/u/1255512?v=4)](https://github.com/Dayjo "Dayjo (2 commits)")[![arekpietrzyk](https://avatars.githubusercontent.com/u/1030701?v=4)](https://github.com/arekpietrzyk "arekpietrzyk (2 commits)")[![trilopin](https://avatars.githubusercontent.com/u/4096774?v=4)](https://github.com/trilopin "trilopin (2 commits)")[![tracer99](https://avatars.githubusercontent.com/u/248429?v=4)](https://github.com/tracer99 "tracer99 (1 commits)")[![ChrisC97](https://avatars.githubusercontent.com/u/47867210?v=4)](https://github.com/ChrisC97 "ChrisC97 (1 commits)")[![josephlimb](https://avatars.githubusercontent.com/u/3937551?v=4)](https://github.com/josephlimb "josephlimb (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/opensrs-osrs-toolkit-php/health.svg)

```
[![Health](https://phpackages.com/badges/opensrs-osrs-toolkit-php/health.svg)](https://phpackages.com/packages/opensrs-osrs-toolkit-php)
```

###  Alternatives

[andersondanilo/cnab_php

Projeto para criar arquivos de remessas e processar arquivos de retorno no formato CNAB

334260.6k2](/packages/andersondanilo-cnab-php)[clausnz/php-helpers

A Collection of useful php helper functions.

388.7k](/packages/clausnz-php-helpers)[bnomei/autoloader-for-kirby

Helper to automatically load various Kirby extensions in a plugin

185.7k2](/packages/bnomei-autoloader-for-kirby)

PHPackages © 2026

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