2017 © Pedro Peláez
 

library mrz-parser

Library to parse machine readable zones (MRZ) of passports and ID cards

image

deft/mrz-parser

Library to parse machine readable zones (MRZ) of passports and ID cards

  • Friday, February 1, 2013
  • by jankramer
  • Repository
  • 2 Watchers
  • 15 Stars
  • 6,790 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

mrz-parser

Library to parse machine readable zones (MRZ) of passports and travel documents, (*1)

Usage

Usage is straightforward:, (*2)

<?php

$mrz = "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<L898902C<3UTO6908061F9406236ZE184226B<<<<<14";

// Parse string
$parser = new Deft\MrzParser\MrzParser();
$travelDocument = $parser->parseString($mrz);

// Use getters to access the parsed information
print $travelDocument->getDocumentNumber(); // Will print 'L898902C'

// Parse array of lines
$mrz = [
    "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<",
    "L898902C<3UTO6908061F9406236ZE184226B<<<<<14"
];
$travelDocument = $parser->parseLines($mrz);

The Versions

01/02 2013

dev-master

9999999-dev

Library to parse machine readable zones (MRZ) of passports and ID cards

  Sources   Download

by Jan Kramer

passport parsing mrz identity document