True Random Number Service

Automated Clients

RANDOM.ORG is a true random number service that generates randomness via atmospheric noise. This page discusses how to use automated clients to interface to the service.

You can write your own client to access the RANDOM.ORG services or you can download one of the clients listed below. If you have written a client that you don't mind other people using, email it to me (preferably with instructions on how to use it), and I will put it on this page. You will of course get full credit.

Use at your own risk!
The clients here are donated by generous users. While they have generally made a good effort to make sure there are as few bugs as possible, there are no guarantees. Please review the source code before you use any of the clients referenced from this page.
Please also verify that your client conforms to the guidelines listed below. Otherwise your machine may end up getting banned.

Important Guidelines

If you use an automated client, please make sure it observes the following guidelines:

  1. Do not hit the server with multithreaded clients. Use a single thread to perform successive requests.
  2. If you need many numbers, issue requests that fetch the numbers in blocks as large as possible. Please do not issue a request for every single number, unless you only need one.
  3. Use a long timeout value for your requests. Unless you have used up your quota, the RANDOM.ORG server actually tries to satisfy all requests, so if you use a short timeout value, your request will be abandoned halfways and the numbers discarded. This increases load on the server. Allow at least a couple of minutes for the server to complete your request.
  4. Configure your client to examine your remaining allowance using the Quota Check interface. If your allowance is negative, your client should back off and not issue any requests for numbers. You can configure your client to check its quota again after ten minutes. If your quota has become positive, you can start issuing requests again.
  5. Configure your client to supply your email address in the User-Agent field of the request. That way, I can drop you a line if your client is causing trouble.

As always, feel free to email me if you have questions!

HTTP Clients

These clients access RANDOM.ORG via the HTTP Interface.

Python Library
Author: Clovis Fabricio
Date: 2008-10-01
Download: http://pypi.python.org/pypi/randomdotorg/
A python module to implement python's random number interface by fetching data from RANDOM.ORG. Methods supported by the standard library random module are supported, except for save/load state and seeding which don't make sense for a true random number generator.

Haskell Package
Author: Austin Seipp
Date: 2008-07-30
Download: http://hackage.haskell.org/packages/archive/RandomDotOrg/0.2.1/doc/html/System-Random-Atmosphere.html
Using this package you can generate random numbers, strings and randomize a sequence of numbers through the random.org website, which provides randomness through atmospheric noise rather than a PRNG.

Python Library
Author: Sean Brewer
Date: 2008-07-29
Download: http://seabre986.googlepages.com/pyrandomdotorg.zip
This library implements everything in RANDOM.ORG's HTTP interface, and fairly thorough documentation is included in the package.

Java Client Library
Author: Roberto Javier Godoy
Date: 2008-07-09
Download: http://sourceforge.net/projects/trng-random-org/
Provides a SecureRandom service (integrated with the Java Security API) for accessing RANDOM.ORG via HTTP/HTTPS.

PHP Client
Author: Jonathon Reinhart
Date: 2008-06-30
Download: http://software.onthefive.com/RandDotOrg/
A basic PHP client. It has been tested pretty thoroughly but is not guaranteed bug-free. Jonathon will fix bugs if you find them.

.NET 2.0 Class Library
Author: EJ Productions
Date: 2008-06-26
Download: ej_random_org_consumer.zip
A class library that lets .NET programmers use the RANDOM.ORG services. It's written in VB.NET, source code included. The author says he doesn't have time to maintain it but feel free to use it as-is.

Python Wrapper
Author: George Dunbar
Date: 2008-05-25
Download: randomwrapy.py
A couple of basic Python client functions, each returning (Python-style) lists of integers generated with/without replacement. There is also a function to return a float in [0, 1] and a function that checks the quota for the IP address of the machine it's on. The number-fetching functions check that the quota is in credit before starting a request.

Ruby Client
Author: Ben Aroia
Date: 2008-04-03
Download: random-get.rb
HTTP GET code for RANDOM.ORG that retrieves random numbers and outputs them in the order they appear. It is/will be possible to allow outputing in several different formats. (i.e. print them/use them one by one, save them to a file in several formats, command line options, etc) This is a basic version that will allow you to use the Integer Generator and output in a single line at the terminal.

SOAP Clients

Unfortunately, the SOAP interface is disabled at the moment.

CORBA Clients

Unfortunately, the CORBA interface is disabled at the moment.

© 1998-2008 Mads Haahr
Valid XHTML 1.0 Transitional | Valid CSS
Web Design by TSDA