Generating Barcodes with PHP

see below for the translation of the barcode
PHP Classes is always my first stop when looking for PHP code, no matter how advanced (or easy to be honest).
I have recently been working on a shopping cart system and implementing barcode generation, as well as allowing a barcode scanner be used as an input device to speed up aspects of order management and data entry.
There are a number of barcode generation classes at PHP Classes. Harish Chauhan’s Barcode Class has been very useful. His class supports a number of barcode standards and allows generation at various sizes. There is a simple form provided to allow generation of barcodes and demonstrate the features of the class.
I will update this when I have finished all the functionality.
The barcode scanner arrives in the morning!
Oh - and the barcode above says “www.createwebsite.info” in the code128 format.
UPDATE: here it is with the font uploaded for the text!

December 15th, 2008 at 8:10 pm
I have been trying to use this same script and noticed that the 128 bar codes are not working properly. Did you have this problem and if so, were you able to fix it? Thanks
December 16th, 2008 at 1:04 pm
It was generating the wrong 128 and my barcode scanner could not scan it but I found the solution on http://www.phpclasses.org/discuss/package/2441/thread/2/
Here is the fix:
Original Code:
$sum=0;
$mfcStr=”";
if($useKeys==’C')
{
for($i=0;$i<strlen($barnumber);$i+=2)
{
$val=substr($barnumber,$i,2);
if(is_int($val))
$sum+=($i+1)*(int)($val);
elseif($barnumber==chr(129))
$sum+=($i+1)*100;
elseif($barnumber==chr(130))
$sum+=($i+1)*101;
$mfcStr.=$encTable[$val];
}
}
Fixed Code:
$sum=0;
$weight = 0;
$mfcStr=”";
if($useKeys==’C')
{
for($i=0;$i<strlen($barnumber);$i+=2)
{
$weight++;
$val=substr($barnumber,$i,2);
if(is_numeric($val))
$sum+=$weight*(int)($val);
elseif($barnumber==chr(129))
$sum+=$weight*100;
elseif($barnumber==chr(130))
$sum+=$weight*101;
$mfcStr.=$encTable[(int) $val];
}
}
If you read his post he gives some information to why you have to change that stuff.
December 16th, 2008 at 1:18 pm
Thanks Zech. I am sure that will help others out.