PHPackages                             drupol/yaroc - 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. drupol/yaroc

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

drupol/yaroc
============

YAROC: Yet Another Random.Org Client.

2.2.0(5y ago)79142[2 PRs](https://github.com/drupol/yaroc/pulls)MITPHPPHP &gt;= 7.4

Since Feb 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/drupol/yaroc)[ Packagist](https://packagist.org/packages/drupol/yaroc)[ Docs](https://github.com/drupol/yaroc)[ Fund](https://www.paypal.me/drupol)[ GitHub Sponsors](https://github.com/drupol)[ RSS](/packages/drupol-yaroc/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (10)Versions (18)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/79845d13885fe7d871faae0dc340ee58d80da716ddaf33199550c998873534b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f647275706f6c2f7961726f632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drupol/yaroc)[![GitHub stars](https://camo.githubusercontent.com/e7c04c9b5e3d5ab5a32c0f7fe7e988ca4cd2db9b9d638f98de866ff7ea1b0ed7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f647275706f6c2f7961726f632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drupol/yaroc)[![Total Downloads](https://camo.githubusercontent.com/efe38e9799d10ba48c8d0751908f1c5d354dcbce5f388217ff6f1f4bdc0ffc6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f647275706f6c2f7961726f632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drupol/yaroc)[![GitHub Workflow Status](https://camo.githubusercontent.com/7c56f45cc63e0c84fee34f94c98720231f9b4453b5b426ae7878d2907fc098a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f647275706f6c2f7961726f632f556e697425323074657374733f7374796c653d666c61742d737175617265)](https://github.com/drupol/yaroc/actions)[![Scrutinizer code quality](https://camo.githubusercontent.com/cf83e3e5d041da44a92b978526c07ea7a16c8debc7520119bb646680a0e36f94/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f647275706f6c2f7961726f632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/drupol/yaroc/?branch=master)[![Type Coverage](https://camo.githubusercontent.com/bc9519b4b3d3b66ebbaea8022045bba82e4fe24cb37d68a74077dde615397f91/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f7374796c653d666c61742d73717561726526636f6c6f723d636f6c6f72266c6162656c3d54797065253230636f7665726167652671756572793d6d6573736167652675726c3d687474707325334125324625324673686570686572642e646576253246676974687562253246647275706f6c2532467961726f63253246636f766572616765)](https://shepherd.dev/github/drupol/yaroc)[![Code Coverage](https://camo.githubusercontent.com/62de46b626b54b0d9dd504c8eb431b2d90599edcdade0eaaa6a69ce4a4e93376/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f647275706f6c2f7961726f632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/drupol/yaroc/?branch=master)[![License](https://camo.githubusercontent.com/39bcc763dcd5f7c9d71c1367b2a32ed8512d08207f28b063615cfd36e6ffd991/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f647275706f6c2f7961726f632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/drupol/yaroc)[![Donate!](https://camo.githubusercontent.com/a71f45de7e408be2477113d166e9ee94c90bbf814a1373fd154aa5b6652302de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d4769746875622d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/sponsors/drupol)[![Donate!](https://camo.githubusercontent.com/cd335a74177c62640acfbb95db4f1848f818606fdf17dc36aed4eef93061dc10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d50617970616c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://www.paypal.me/drupol)

YAROC
-----

[](#yaroc)

Yet Another [Random.Org](https://random.org) Client.

YAROC fully supports [V1](https://api.random.org/json-rpc/1/) and [V2](https://api.random.org/json-rpc/2) API.

Most of the classes of this library are stateless and immutable.

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

[](#requirements)

- PHP &gt;= 7.4
- An HTTP Client (see [symfony/http-client](https://github.com/symfony/http-client))

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

[](#installation)

```
composer require drupol/yaroc
```

YAROC needs an HTTP client in order to work, do

```
composer require symfony/http-client
```

or provide one.

Usage
-----

[](#usage)

First [request an API Key](https://api.random.org/api-keys) or use the temporary key.

**The temporary API key used in the examples will be disabled when the beta ends.**

You can call [any API methods described in the documentation](https://api.random.org/json-rpc/1/basic) from [Random.org](https://random.org).

Currently support all the [Random.org](https://random.org) API method calls in the [basic](https://api.random.org/json-rpc/2/basic) and [signed](https://api.random.org/json-rpc/2/signed) APIs.

Examples
--------

[](#examples)

```
