Play Truly Random - API

Service endpoint interface of playtrulyrandom.com with API specifications and URL examples.

index.php

Display homepage with status and image of last submission.

Example: /index.php

data.php

Retrieve the latest entropy pool data as raw binary blob. source=[text] specifies the HRNG source name. n=[#] specifies the number of bytes to read (max=1M).

Example: /data.php?source=noise-ver1.0&n=32

display.php

Generates a PNG image from entropy pool submissions. id=[#] specifies the pool record ID.

Example: /display.php?id=1000

retrieve.php

Retrieve entropy pool data as string of 0/1 characters. source=[text] specifies the HRNG source name. user=[text] specifies a unique user ID (i.e. GUID). n=[#] specifies the number of bits to read (max=1K).

Example: /retrieve.php?source=noise-ver1.0&user=me&n=16

status.php

Displays the current status of PTR as webpage /w image.

Example: /status.php

submit.php

Submit random bits to the PTR entropy pool. source=[text] specifies the HRNG /source name. bits=[text] specifies the bits to submit (0/1 accepted).

Example: /submit.php?source=noise-ver1&bits=01010101

usage.php

Track usage statistics of user by RNG mode and duration. source=[text] specifies the HRNG source name. user=[text] specifies a unique user ID (i.e. GUID). hrngmode=[#] indicates if HRNG was used (=1). duration=[#] specifies the usage duration in seconds.

Example: /usage.php?source=noise-ver1&user=me&hrngmode=1&duration=120