1. Go to this page and download the library: Download ballspins/nik-parser 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/ */
ballspins / nik-parser example snippets
use Ballspins\NikParser\NikParser;
$parser = new NikParser('3578201503990001');
$data = $parser->getDetails();
print_r($data);
use Ballspins\NikParser\NikGenerator;
// Generate NIK Pria
$nik = NikGenerator::generate('357820', new DateTime('1999-03-15'), 'pria');
// Generate NIK Wanita (Otomatis +40 pada tanggal lahir)
$nikWanita = NikGenerator::generate('357820', new DateTime('2001-08-12'), 'wanita');