Contrast bar codes and 2D codes
Only one-dimensional barcode in one direction (usually the horizontal direction) expressing information, any information in the vertical direction is not expressed, which is usually a certain height in order to facilitate alignment of the reader. Two-dimensional space in the bar code information is stored in the horizontal and vertical directions, called two-dimensional barcode (dimensional bar code). Compared to one-dimensional bar codes, two-dimensional code is described in more complex data, such as images, web links and so on.
One-dimensional bar code information into the application can improve the speed and reduce the error rate, but one-dimensional bar codes, there are some shortcomings:
● data capacity is small: about 30 characters
● can only contain letters and numbers
● barcode relatively large in size (space utilization is low)
● can not read the bar code is damaged after (partial destruction may still be able to read)
Compared with the two-dimensional bar code with the one-dimensional bar code obvious advantages, summarized in the following areas:
● greater data capacity
● beyond the limits alphanumeric
● Barcode relatively small size
● Resistant to damage the ability
Bar code and two-dimensional code application scenarios
Barcode application scenarios
Bar code information can be marked goods producer, manufacturer, product name, date of production, book classification number, e-mail starting and ending location, category, date, etc., which have been in many areas of commodity circulation, library management, postal management, banking systems, etc. a wide range of applications
Scenario two-dimensional code
● access to information (business cards, maps, WIFI password, data)
● Website Jump (Jump to microblogging, mobile site, site)
● advertising push (user scan code, browse the merchant directly push video, audio advertising)
● Phone electricity supplier (user scan code, phone directly under the shopping list)
● security traceability (user scan code to see the producer; while the background can obtain final consumption)
● Promotions (user scan code, download e-coupons, sweepstakes)
● members of management (members access to electronic information on the user's mobile phone, VIP service)
● mobile payment (two-dimensional code scanning merchandise, through a bank or third-party payment channels provided by the mobile terminal to complete the payment)
Classification of barcodes and 2D codes
Classification barcode
Common follows, details see Wikipedia barcode
● EAN, UPC code
● ISBN code (bar code books)
● 39 yards (39 alphanumeric code is the first code system)
Classification of two-dimensional code
Common follows, details see Wikipedia two-dimensional bar code
● PDF417 two-dimensional bar code
● Maxicode two-dimensional bar code
● QR Code
Examples show
Address: http://m.54php.cn/demo/scan_code can also phone to scan the following figure
Blog using the product
Library book details page to join ISBN bar code display, easy to use mobile phones Taobao and micro-channel scan code
Phone Taobao scan code results
Renderings
Related to the core code
<?php
$barcode = '9787115281487';
$url = 'http://m.vincentguo.cn';
$email = 'mailto:[email protected]';//邮件二维码内容
//名片二维码内容
$vcard = 'BEGIN:VCARD
VERSION:3.0
FN:郭威
NICKNAME:编程浪子
TITLE:PHP研发工程师
TEL;TYPE=work:181****9661
TEL:181****9661
EMAIL:www.54php.cn
END:VCARD';
$wifi = 'WIFI:T:WPA;S:ChuangJia-2F-B;P:123456789';//wifi二维码内容
$sms = 'smsto:8613774355074:你好,二维码发短信';//短信二维码内容
$tel = "tel:13774355074";//电话二维码内容
?>
Resources
barcodephp
Project Address: http://www.barcodebakery.com/
yii2-qrcode
Project Address: https://github.com/2amigos/yii2-qrcode-helper
Official website address: http://www.2amigos.us/open-source/details/qrcode-helper
Scanning APP
Download: http://www.wochacha.com/
Original Address: [Demo] generate two-dimensional code and bar code
labels: two-dimensional code barcode Barcode qrcode wifi SMS business cards
Intelligent Recommendation
- php achieve two-dimensional code scanning Login
- [Micro-channel two-dimensional code skills] how to know each other through the micro-micro-channel signals
- [Important] ASCII code table
- [] No.5 Ionic modify the application name, icon, start interface
- [Demo] QQ, github, third-party social microblogging Login
Reproduced in: https: //my.oschina.net/54php/blog/757186