Absolute sleep
[mirrors/Programs.git] / php / idgen.php
CommitLineData
79a323cb
H
1#!/usr/bin/php
2<?php
3
4function 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
21obcanka_ocr_line("CZE", "TOMAS", "NOVAK", "M", "204672478", "800456/0096", "100202");
This page took 0.237994 seconds and 4 git commands to generate.