PHP Classes

File: linear_ean13.php

Recommend this page to a friend!
  Classes of Dmitry A. Kirilin   Base460 Parser   linear_ean13.php   Download  
File: linear_ean13.php
Role: Example script
Content type: text/plain
Description: Extract EAN-13 codes to linear text
Class: Base460 Parser
Extract bar code information from Base460 files
Author: By
Last change:
Date: 16 years ago
Size: 486 bytes
 

Contents

Class file image Download
#!/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";
    }


?>