PHP code example of ionepub / idcard

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

    

ionepub / idcard example snippets






$id = $idcard->getId();

$id = $idcard->setId('130724197906126153')->getId();

$result = $idcard->check();

$result = $idcard->setId('130724197906126153')->check();

$id = $idcard->format(); // 1307**********6153
$id = $idcard->format('-'); // 1307----------6153

$id = $idcard->format('*', 3); // 130***********6153

$id = $idcard->format('*', 3, 2); // 130*************53