By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,576 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,576 IT Pros & Developers. It's quick & easy.

Barcode implementation regarding php

P: 32
Hi guys,

i am planning to create 1 barcode that will display in both PC and also mobile phone.i tried out using code-39 using php .but its not getting fit in mobile screen , the user need to scroll the mobile browser inorder to view the full barcode.

My client want me to create 1 barcode that will fit the mobile screen frame (up to max 10 character).i don't have much knowledge about barcode.can you suggest me the best barcode and most widely used barcode in US right now.

I also want to know whether i need to purchase a licence for that barcode.Its getting late from my side.i need to implement the barcode with in next 2 week.
i am looking ofr some help from you guys

A.suresh
Jul 30 '07 #1
Share this Question
Share on Google+
3 Replies


P: 22
Hey,
You could make bar like images and assign each as a number gaining width as it goes bigger then when you input a number it will show the barcode by showing a differant image for each number.. this way you can make it fully customized... You could also decrease the size of your old script by finding where the image is create or included... personally I would do this... Then set the reader to select a number with the length of black.
[php]
<?php
$input = $_POST['input'];
$barcodes = array('0.jpg' , '1.jpg' , '2.jpg' , '3.jpg' , '4.jpg' , '5.jpg' , '6.jpg' , '7.jpg' , '8.jpg' , '9.jpg');
$input = str_split($input);
//then kick it into an array//
//okay now we need to echo each image variable corresponding with the number posted//
foreach($input as $current)
{
echo '<IMG SRC="' . $barcodes[$current] . '"></IMG>';
}
?>
[/php]

that's the easiest way to make a barcode that's variable I know... course you could go into the all the complicated stuff... I wouldn't though.
Note that you'll need php5 for this to work.
Jul 30 '07 #2

pbmods
Expert 5K+
P: 5,821
Heya, A.suresh.

Are you using Image_Barcode?

Image_Barcode allows you to specify the dimensions of the resulting image.

As far as the license goes, as long as it is not a key component of the technology that you are trying to market, you should be OK.

In other words, if you use the barcodes as a method of convenience for the end User, you're OK. But if you were selling barcode generation software, you'd definitely want to talk royalties with the developer.
Jul 30 '07 #3

ak1dnar
Expert 100+
P: 1,584
Moved to php Forum from php articles section...
-ajaxrand
Jul 31 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.