RSS

Archive for May, 2011

Generating Simple 1D Barcodes with PHP

Posted by Shaiful Borhan on May 26, 2011

Shaiful Borhan profile pictureShaiful shares a simple tool for starters exploring about barcode generation in PHP applications. Shaiful Borhan is the Web Analyst and Developer at Stampede.

In web applications like an online-ticketing system, encoding the purchase reference number as barcodes on the ticket print or voucher can be quite useful in helping over-the-counter staff to quickly handle processes such as guest check-in using a barcode scanner.

There are many kinds of barcode formats out there to cater the types or amount of data you are trying to encode. However if you are just starting out for a bit of familiarization, generating 1D barcodes with PHP couldn’t be simpler with the free (for non-commercial use) PHP Barcode Generator class.

Extract the ZIP and use the following line to generate a barcode in a Code 39 barcode format encoding the string A1B2C3D3.

<div>
   <img src="html/image.php?code=code39&amp;o=1&amp;dpi=72&amp;t=80&amp;r=1&amp;rot=0&amp;text=A1B2C3D3&amp;f1=Arial.ttf&amp;f2=10&amp;a1=&amp;a2=&amp;a3=" alt="Barcode" />
</div>
Image

The resulting barcode


Some key parameters:

code
     
The barcode format. Most of the standard 1D formats are supported such as Code 93 (code93), Code 128 (code128), UPC (upca) and EAN 8 (ean8).
o
          
The output image format; PNG (1), JPEG (2) or GIF (3)
t
The thickness or height
rot
The rotation angle; 0, 90, 180 or 270
text
The data to encode. Code 39 only supports uppercase letters and numeric digits.
f2
The font size of the label

For a more detailed explanation of each parameters and configurations, please refer to the barcode generator GUI tool bundled in the ZIP archive.

Have a nice day.

Posted in Code Add Comment »

Weekly Finds

Posted by Shaza Hakim on May 24, 2011

Shaza Hakim profile pictureIn her spare time, Shaza Hakim plays video game and collects, rather compulsively, tiny bits and pieces of internet that makes inspiring work looks easy. Shaza is the Creative Lead at Stampede.

Mark Zuckerberg stationery# Mark Zuckerberg stationery Mike Dempsey's design business tips# Mike Dempsey # Urban Improv Low-res fashion show# 8-Bit Fashion Show Saul Bass# Saul Bass Error Recovery# Innovation Jessica Hische # Jessica Hische Nananana Batman# Somebody make this print stat!

Posted in Inspiration, Roundups Add Comment »

On Horizontal Loyalty

Posted by Shaza Hakim on May 22, 2011

I work because...

So for this age, for your time, I want you to just think about this: Think about NOT waiting your turn.

Shaza Hakim profile pictureDon’t wait. Scour and scramble instead to get to your starting point. Then scramble some more. Shaza is the Creative Lead at Stampede.

“Some people when they look for a job in journalism ask themselves, What do I like to do and Who can take me there? Who can get me to a war zone? To a ballpark? To Wall Street? To politicians, to movie stars? Who’s got the vehicle? And you send them your resume and you say, “I want a seat in your car.” … And you wait. But there are some people, who don’t wait. I don’t know exactly what going on inside them; but they have this… hunger. It’s almost like an ache.Something inside you says I can’t wait to be asked I just have to jump in and do it. So for this age, for your time, I want you to just think about this: Think about NOT waiting your turn. Instead, think about getting together with friends that you admire, or envy. Think about entrepeneuring. Think about NOT waiting for a company to call you up. Think about not giving your heart to a bunch of adults you don’t know. Think about horizontal loyalty. Think about turning to people you already know, who are your friends, or friends of their friends and making something that makes sense to you together, that is as beautiful or as true as you can make it. In every career, your job is to make and tell stories, of course. You will build a body of work, but you will also build a body of affection, with the people you’ve helped who’ve helped you back. And maybe that’s your way into Troy.”
From Robert Krulwich’s 2011 commencement speech at UC-Berkeley’s Journalism School, via Tim Carmody, who ran around the entire internet giving a million high-fives because of this speech, and to Ed Yong, Tim’s high-five #001.

Posted in Giving Back, Inspiration Add Comment »