PHP code example of oranfry / jars

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

    

oranfry / jars example snippets


cd "$HOME/Projects"
git clone https://github.com/oranfry/jars.git
cd jars

composer install
npm install
./build



return (object) [
    'root_username' => 'root',
    'root_password' => 'test123',
    'sequence' => (object) [
        'secret' => 'SECR3T',
        'banned_chars' => ['/', '=', '+'],
    ],
];



return (object) [
    'root_username' => 'root',
    'root_password' => 'test123',
    'sequence' => (object) [
        'secret' => 'SECR3T',
        'banned_chars' => ['/', '=', '+'],
        'max' => 1000000,                   // example added line
        'collisions' => [398734, 541078],   // example added line
    ],
];

mkdir -p "$HOME/Projects/jars/var/portals/myportal"

// Generate a sequence secret
php -r 'echo base64_encode(random_bytes(63)) . "\n";'