PHP code example of canren / red-packets

1. Go to this page and download the library: Download canren/red-packets 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/ */

    

canren / red-packets example snippets



    $redPackets = new redPackets;
    while(true){
        $redPacketsData = $redPackets->redPacketsInit(1, 20000, 200);
        if (!isset($redPacketsData[199])) {
            var_dump($redPacketsData);
            die();
        }
    }