PHP code example of songyz / common-lib

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

    

songyz / common-lib example snippets


    $str = 'james';
    $str = Aes::encrypt($str, '123');
    echo $str;

    $str = 'NL7rrUNodNkSMvdBtDbob334VRnlM25/TPjkCcga9mE=';
    $data = Aes::decrypt($str, '123');
    var_dump($data);

$img = Captcha::createImg("1234");
print_r($img);

 $idCardInfo = Card::idCardInfo("130182198411201911");

$birthDay = Card::getBirthDay("130182198411201911", "/");

    $token = '';
    $jwtService = new JwtService($token, $this->jwt_rsa_public, $this->jwt_rsa_private, $this->jwt_expire);
    $token = $jwtService->getToken(1, ['name' => 'james']);
    echo $token;