PHP code example of soundways / iso7064

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

    

soundways / iso7064 example snippets


use Soundways\Iso7064\GRid;

$grid = new GRid('A1-2425G-ABC1234002');

$grid->encode();

// returns 'A1-2425G-ABC1234002-M'
$grid->getDelimitedGRid();

$mod = new Mod3736();
$code = 'ABCDEFG';
$code .= $mod->generateCheckChar($code);

// returns true
GRid::checkGRid('A1-2425G-ABC1234002-M');

// returns false
GRid::checkGRid('A1-2425G-ABC1234002-0');