Home Microsoft SQL Server DigiMailing Contact
    Keyword



Barcode scannen

 
In November 2004 I have started a product to identify people with an identification card. The main goal was to keep the costs as low as possible. And it did, with only € 500 euros the whole soft- and hardware solution was installed. But for that reason a lot of hi-tech material was no option.
The cheapest option was barcode scanning. Some advantages
  • You can make as many as you like.
  • You can print them with every printer.
  • The hardware costs are very low.
  • It’s easy to implement with software, especially if you use a keyboard wedge scanner.
In our situation it’s became a web interface along with a MySQL database and a Metrologic Keyboard wedge barcode scanner.
 
Technique to make the barcode
You can install barcode fonts on your front end computer to produce the code. Even though I wanted some more exchange possibilities. So I generated the codes on the fly using the Barcode Render Class from Karim Mribti (http://www.mribti.com/barcode/).
On his site there are a lot of examples. The easiest way is to attaché his code as library to your own site. After that you can use it to print a barcode image as:
 

echo "<img src='image.php?code=".$barcode."&style=452&type=I25&width=200&height=120&xres=2&font=5'>";

With the right database optimalisation (MyISAM table objects) the performance was that good that it was able to produce thousands of code's at a time.
As the personal information relies in the database you can make as many of statistics as you want, think of average age, number of visits and so on.
Even when a company as this one would start another bar you could use database replication to synchronise the visitors.

 

The image.php could like something like this

<?php
/*
Barcode Render Class for PHP using the GD graphics library
Copyright (C) 2001  Karim Mribti
        
   Version  0.0.7a  2001-04-01 
        
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
                 
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
             
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                  
Copy of GNU Lesser General Public License at: http://www.gnu.org/copyleft/lesser.txt
             
Source code home page: http://www.mribti.com/barcode/
Contact author at: barcode@mribti.com
*/
 
  define (__TRACE_ENABLED__, false);
  define (__DEBUG_ENABLED__, false);
 
  require("barcode.php"); 
  require("i25object.php");
                    
  if (!isset($style))  $style   = BCD_DEFAULT_STYLE;
  if (!isset($width))  $width   = BCD_DEFAULT_WIDTH;
  if (!isset($height)) $height  = BCD_DEFAULT_HEIGHT;
  if (!isset($xres))   $xres    = BCD_DEFAULT_XRES;
  if (!isset($font))   $font    = BCD_DEFAULT_FONT;
         
  $obj = new I25Object($width, $height, $style, $code);
   
  if ($obj) {
      $obj->SetFont($font);  
      $obj->DrawObject($xres);
     $obj->FlushObject();
     $obj->DestroyObject();
     unset($obj);  /* clean */
  }
?>



Syntax
Last revision
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash