Skip to content
PHP client for Random.org
Branch: master
Clone or download
Latest commit e5389d0 Jul 2, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Create README.md Jul 2, 2014
RandDotOrg.class.php
test.php v1.1.0 Use get_file_contents() for non-curl installations Aug 31, 2011

README.md

phpRandDotOrg

PHP client for Random.org

Usage / Examples

get_integers($num=1, $min=0, $max=10, $base=10)
Ex: $rand_org->get_integers(3, 5, 10);

Array
(
    [0] => 7
    [1] => 7
    [2] => 8
)

**`get_sequence($min=1, $max=10)`**
Ex: `$rand_org->get_sequence(1, 7);`
Array
(
    [0] => 5
    [1] => 7
    [2] => 1
    [3] => 3
    [4] => 4
    [5] => 6
    [6] => 2
)

**`get_strings($num=1, $len=10, $digits=TRUE, $upperalpha=TRUE, $loweralpha=TRUE, $unique=TRUE)`**
Ex: `$rand_org->get_strings(3, 20, FALSE, TRUE, TRUE, FALSE);`
Array
(
    [0] => kMLSqKeLLiBcXrcPKBso
    [1] => pIBpxMIAuagOFeDcgALy
    [2] => jhHKhTTkidDcXVCCwExR
)

**`quota($ip=NULL)`**
Ex: `$rand_org->quota();`
Array
(
    [0] => 994378
)

Also note: it is best to provide your email address / URL in the parameter when initializing this object:
include 'RandDotOrg.class.php';
$rand_org = new RandDotOrg('MyApp - exmaple.com');
You can’t perform that action at this time.