Barcode implementation regarding php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suresh_nsnguys
    New Member
    • Aug 2006
    • 32

    #1

    Barcode implementation regarding php

    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
  • tscott
    New Member
    • Jul 2007
    • 22

    #2
    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($inpu t);
    //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.

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      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.

      Comment

      • ak1dnar
        Recognized Expert Top Contributor
        • Jan 2007
        • 1584

        #4
        Moved to php Forum from php articles section...
        -ajaxrand

        Comment

        Working...