Hello everyone, in this tutorial i am going to explain how to generate QR code in PHP using PHP QR code library.
QR code means Quick Response Code, and it is a 2D bar code images of texts.
Generating QR code in PHP using libqrencode C library,which is an opensource library, type provide API for generating bar codes and are purely implemented in PHP.
Follow below steps to generate QR Code in PHP,
Step 1 : Download QRcode library from http://phpqrcode.sourceforge.net/
Step 2 : Create a PHP file and name it as generateQRCode.php, then copy and paste below code.
include(‘qrlib.php’); // include the library for generating QR code
$text = ‘hardycodes’; // generating the qr code of the given text
$file_name = “qrcodes/qrcode.png”; //mention the path to save qr code image
QRcode::png($text,$file_name); // generating the qr code
Step 3: Yup !. now run the code, you can see the generated QR Code of the text given by you.