PHP code example of appengine-ltd / ticket-picker

1. Go to this page and download the library: Download appengine-ltd/ticket-picker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

appengine-ltd / ticket-picker example snippets




use AppEngine\TicketPicker\Pickers\Picker;

CDEF12',
    'GHIJKL34',
    'MNOPQR56',
    'STUVWX78'
];

$seed = 'my-secure-seed'; // You can also generate a secure seed using the Seed class

$winningCode = $picker->generateCode($ticketCodes, $seed);

echo "Winning Code: " . $winningCode . PHP_EOL;



use AppEngine\TicketPicker\Generators\Seed;

r->generateSeed(16);

echo "Generated Seed: " . $seed . PHP_EOL;