PHP Classes
elePHPant
Icontem

File: ean13.php

Recommend this page to a friend!
  Classes of Marco van Oostende  >  ean13  >  ean13.php  >  Download  
File: ean13.php
Role: Example script
Content type: text/plain
Description: example file
Class: ean13
Generate ean-13 bar code images using a TTF font
Author: By
Last change:
Date: 10 years ago
Size: 423 bytes
 

Contents

Class file image Download
<?php

   
include_once('ean13class.php');
   
   
$ean13 = new ean13;
   
$ean13->article = '970612017695'; // initial article code
   
$ean13->article .= $ean13->generate_checksum(); // add the proper checksum value
   
$ean13->reverse(); // the string is printed backwards
   
$ean13->article = $ean13->codestring(); // returns a string as input for the truetype font
   
$ean13->create_image(); // render the image as PNG image

?>