PHP code example of zeraphie / passwordgen

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

    

zeraphie / passwordgen example snippets


// Require the autoloader
Gen;
$passwordGen = new PasswordGen();

echo $passwordGen->password();

echo $passwordGen->setLength(32)->password();

echo $passwordGen->setKeyspace('abcdefghijklmnopqrstuvwxyz')->password();

echo $passwordGen->generateKeyspace('lunsw')->password();

echo $passwordGen->setLength(32)->generateKeyspace('lunsw')->password();