👉 A library using PHP to generate QRCode from https://www.qrcode-monkey.com free
✋ NOTE: Do not generate too many QRCode at once or your IP will be locked for a period of time
Use composer
to integrate your PHP project
composer require nguyenary/qr-code-monkey
📘 You can configure to generate QRCode or use default configuration. Below is a list of configurations that you can use
For details on the examples please see the file
example.php
require_once 'vendor/autoload.php';
use nguyenary\QRCodeMonkey\QRCode;
$qrcode = new QRCode('nguyenary');
print_r($qrcode->create());
The above code will return a URL containing a QR Code
$qrcode->create('file_qrcode.png');
$qrcode = new QRCode('nguyenary');
$qrcode->setConfig([
'bgColor' => '#FFFFFF',
'body' => 'square',
'bodyColor' => '#0277bd',
'brf1' => [],
'brf2' => [],
'brf3' => [],
'erf1' => [],
'erf2' => [],
'erf3' => [],
'eye' => 'frame0',
'eye1Color' => '#000000',
'eye2Color' => '#000000',
'eye3Color' => '#000000',
'eyeBall' => 'ball0',
'eyeBall1Color' => '#000000',
'eyeBall2Color' => '#000000',
'eyeBall3Color' => '#000000',
'gradientColor1' => '#0277bd',
'gradientColor2' => '#000000',
'gradientOnEyes' => 'true',
'gradientType' => 'linear',
]);
// Set logo path file to use
$qrcode->setLogo('image/facebook.png');
// Support png, svg, jpg, pdf, eps
$qrcode->setFileType('png');
// Size limit is 3480 pixel
$qrcode->setSize(200);
What's all the bells and whistles this project can perform?
- High quality images for printing
- Generate QRCode completely for free
- Many QRCode templates can be customized
- Can be exported as a URL or saved as a file
- Output format options (Support
png
,svg
,jpg
,pdf
,eps
)
✋ NOTE: Format pdf
and eps
no support for color gradients
This is a project I do in my spare time to contribute to the community. I would very much welcome if you would like to contribute to this project
The code in this project is licensed under MIT license