#!/usr/bin/php
<?
/*
Sample script to extract all the EAN13 codes from BASE460 file
into linear text file.
*/
include_once('base460parser.class.php');
$base=new Base460Parser();
$data=$base->ParseFile('my_enterprise_GLN.base460');
if($data)
foreach($data as $GLN=>$ent_data)
foreach($ent_data as $GID=>$group)
foreach($group as $REC=>$record)
foreach($record['EAN13'] as $ean)
{
echo $ean['GCP'].$ean['NUM'].$ean['CHECKSUM']."\t".$record['NAME']."\n";
}
?>
|