Commit | Line | Data |
---|---|---|
79a323cb H |
1 | #!/usr/bin/php |
2 | <?php | |
3 | ||
4 | function obcanka_ocr_line($country, $name, $familyn, $sex, $opno, $personalno, $expires_YYMMDD) { | |
5 | $experno = explode("/", $personalno); | |
6 | $birthnum = $experno[0].$experno[2]; | |
7 | $birthnum[2] = 0; | |
8 | ||
9 | $blankline = "####################################"; | |
10 | ||
11 | $nameline = "ID$country$familyn<<$name$blankline"; | |
12 | $nameline = str_replace("#", "<", $nameline); | |
13 | $nameline = substr($nameline, 0, 36); | |
14 | //echo strlen($nameline)."\n"; | |
15 | echo("$nameline\n"); | |
16 | ||
17 | $numline = $opno."1".$country.$birthnum."1".$sex.$expires_YYMMDD.$experno[1]."<<<".rand(0,9); | |
18 | echo("$numline\n"); | |
19 | } | |
20 | ||
21 | obcanka_ocr_line("CZE", "TOMAS", "NOVAK", "M", "204672478", "800456/0096", "100202"); |