Skip to content

JonathonReinhart/phpRandDotOrg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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');

About

PHP client for Random.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages