SEPA::init(SEPA_INIT_LICUSER, "USER"); # lizenzierter BenutzernameSEPA::init(SEPA_INIT_LICCODE, "CODE"); # Lizenzcode
$filename = $argv[1];
$parser = new SEPAStatementParser();$parser->load(SEPA_STMT_FORMAT_MT940, $filename);$stmts = $parser->getStatements();foreach ($stmts as $stmt) { foreach ($stmt['tx'] as $tx) { print "Valuta: ${tx['valuta']}\n"; print "Betrag: ${tx['amount']}\n"; print "Verwendungszweck: ${tx['purpose']}\n"; print "SEPA-Verwendungszweck: ${tx['svwz']}\n"; }}
> php module_sepa.php 2093396009_2014-09-03_2014-04-07.txt
PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)Copyright (c) 1997-2012 The PHP GroupZend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH