In this short article, we’ll take a look at one way to generate a QR code using PHP.
According to the “brain” of our internet (Wikipedia), which rarely lies :), a QR code is:
QR code (Quick Response Code) — a trademark for a type of matrix barcode (or two-dimensional barcode), originally developed for the automotive industry in Japan.
To put it simply, a QR code is an image containing a square-shaped barcode. It can be scanned using a mobile phone (with the proper software installed) or a special scanning device.
Let’s get to the point
We won’t reinvent the wheel — to generate a QR code in PHP, we’ll use the ready-made library “phpqrcode” (thanks to the author!). The library can be downloaded from GitHub via this link.
The library is lightweight and consists of just a few dozen files totaling a little over 250 KB.
