Many days ago and I came back again with new task and new tutorial, this tutorial about
Qr code... So before see the video lets know what QRcode is and how to use it?
What is a QR code?
A QR code is a shortcut of Quick Response code it is a type of barcode, it is the updated version of the barcode, and it is a (2D) barcode that can store about 4,000 alphanumeric characters in a just small image.
It was developed to serve auto manufacturing industry but today it has a number of purposes in many cases like (marketing, transportation, entertainment .etc.)
Why was it most popular?
Because it was very easy to use, just go to iPhone store or play store or any mobile application store, download Qr reader application and scan with your mobile camera.
You don’t need to use barcode scanner, it is also can take actions not just copy data from QR code, as example you can redirect someone to your Facebook page or your YouTube channel or to send SMS or to make Skype call, Whatsapp use QR code to encrypt users data and to complete authentication login process.
Note: PHP QR Code is Open Source (LGPL) library for generating QR Code if you want to read the full documentation for more details you can read it from here
1- Download the project from the bottom link page and extract it in localhost
2- Create new database, name it as (demo)
3- Import tables from application/tables
4- Go to the URL http://localhost/codeigniter_demo/Qr_code_generate
In this app we have
1- Qr_code_generate controller
In this controller, we have two methods Index to show random user from users table and print_qr to generate Qr image files from users table
2- User_model model
To select our users from users table
3- Ci_qr_code library
Import qr_code original files from third party folder
4- QR code third_party
The original files for PHP QR code library, you can also download this package from their Sourceforge repo in this link, but I recommended to use it from my full example directly
5- Global folder
6- Views folder
Which contains views file for our layout templates with header and footer and content
You can show this video to show how it is works