PHP Classes

File: examples/getbytes.php

Recommend this page to a friend!
  Classes of Christian Vigh   PHP Random.Org API   examples/getbytes.php   Download  
File: examples/getbytes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Random.Org API
Generate random values using random.org
Author: By
Last change: Update of examples/getbytes.php
Date: 1 year ago
Size: 606 bytes
 

Contents

Class file image Download
<?php
   
/**************************************************************************************************************

        getbytes.php -
        Echoes the number of random bytes specified by the $count variable.
   
     **************************************************************************************************************/
   
require ( 'examples.inc.php' ) ;

   
$random = new RandomOrg ( $agent_string ) ;
   
$count = 10 ;
   
$values = $random -> GetBytes ( $count ) ;

    echo (
"Getting $count random bytes :\n" ) ;
    echo (
"\t" . implode ( ', ', $values ) . "\n" ) ;

   
display_statistics ( $random ) ;