神秘空投/小空投网站源码,小空投公众号源码下载,空投小程序源码下载制作介绍

------------------- 程序特色 ----------------------

发送空投:支持发送文字、图片、语音、视频等多种类型的空投

接受空投:用户在输入对应的空投后,可以查看到空投内容并回复

吐槽广场:用户内部的小论坛,支持分享图片、点赞、选择分类等

短信通知:支持微信转发空投,短信通知空投,内置接口发送方便

部署简单:内置网站一键自动安装,快速部署上线,配置简单

源码下载地址:小空投公众号版https://wwi.lanzoup.com/b056tfqsf    密码:6rxr

​​​​​​​

---------------- 代码介绍 ----------------

    public function qrcode(){
        $text = $this->request->param("text","");
        
        $M = new QrCode();
        $M->setText($text)
            ->setSize(300)
            ->setPadding(10)
            ->setErrorCorrection('high')
            ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))
            ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))
            ->setImageType(QrCode::IMAGE_TYPE_PNG);
        $content = $M->get();
        return response($content, 200, ['Content-Length' => strlen($content)])->contentType($M->getContentType());
    }

    public function qrcode3(){
        $text = $this->request->param("text","");
//        $token = $this->request->param("token","");
//        if(empty($text) || empty($token) || !check_token($text, $token)){
//            return;
//        }

        $qrCode = new EnQrcode(Request::domain()."/index.html#" . $text);

        header('Content-Type: '.$qrCode->getContentType());
        $qrCode->setSize(500);
        $qrCode->setErrorCorrectionLevel(new ErrorCorrectionLevel('high'));
//        $qrCode->setLogoPath('./static/common/images/qrcode_logo.png');
        $qrCode->setLogoSize(75, 75);
        $content = $qrCode->writeString();
        return response($content, 200, ['Content-Length' => strlen($content)])->contentType($qrCode->getContentType());
    }
    protected function validate(array $data, $validate, array $message = [], bool $batch = false)
    {
        if (is_array($validate)) {
            $v = new Validate();
            $v->rule($validate);
        } else {
            if (strpos($validate, '.')) {
                // 支持场景
                list($validate, $scene) = explode('.', $validate);
            }
            $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
            $v     = new $class();
            if (!empty($scene)) {
                $v->scene($scene);
            }
        }

        $v->message($message);

        // 是否批量验证
        if ($batch || $this->batchValidate) {
            $v->batch(true);
        }

        return $v->failException(true)->check($data);
    }

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

形影相吊.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值