8000 GitHub - ybring/qrcodeplus: 可以生成四色, 九色, 十六色, 背景图二维码, 彩色二维码!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ybring/qrcodeplus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

WaitMoonMan/QrCodePlus

基于 QR Code 的一个二维码包

Feature

  • 基于QR Code, 保留原有方法
  • 可以生成四色, 九色, 十六色, 背景图二维码
  • 后续功能增加中...

四色二维码 九色二维码 图片二维码

Requirement

  1. PHP >= 5.4
  2. composer

Installation

composer require waitmoonman/qrcodeplus

Usage

基本使用: (九色)

<?php
    
    require 'vendor/autoload.php';
    
    use QrCodePlus\Exception\InvalidException;
    use QrCodePlus\QrCodePlus;
    
    $qrcodeplus = new QrCodePlus();
    $qrcodeplus->setText('http://blog.shiguopeng.cn');
    $qrcodeplus->setSize(500);
    
    
    try
    {
        // 设置颜色, 四种或者九种或者十六种
        $param = [
            '#087',
            '#431',
            '#a2d',
            '#12d',
            '#098',
            '#182',
            '#039',
            '#20d',
            '#520',
        ];
        
        // If you want to generate, the picture is the background
        // $param = imagecreatefrompng('your.png');
    
        // build function`s parameter 2 sets transparency
        $qrcodeplus->build($param);
    
    }
    catch (InvalidException $e)
    {
        var_dump($e->getMessage());
    
        exit();
    }

Documentation

License

MIT

About

可以生成四色, 九色, 十六色, 背景图二维码, 彩色二维码!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%
0