1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        dcodephp 生成二維碼

        聯(lián)合創(chuàng)作 · 2023-09-30 13:01

        一個基于QR Code encoder的生成二維碼的php擴展,同時實現(xiàn)了Discuz論壇系統(tǒng)里面的authcode函數(shù),相比php版本速度更快,生成幾萬個二維碼秒秒鐘。如果使用Discuz論壇,需要有這方面性能提升的,那么該擴展時不錯的選擇。

        依賴: php5.4+ libpng

        示例代碼:

        DCode::encrypt($src, $key = "THIS IS SHIT", $ckeylength = 8, $expire = 0);
        DCode::decrypt($src, $key = "THIS IS SHIT", $ckeylength = 8);
        
        /** 
        * DCode::qrcode($str, $version = 0, $level = QR_ECLEVEL_L, $mode = QR_MODE_KANJI, $casesensitive = 0);
        * @param $str;
        * @param $version = 0;
        * @param $level = QR_ECLEVEL_L;
        * @param $model = QR_MODE_KANJI;
        * @param $casesensitive = 0;
        * @return string
        */
        $filecontent = DCode::qrcode("HELLO");
        file_put_contents("test.png", $filecontent);
        
        /**
        * DCode::qrcode8bit($str, $version = 0, $level = QR_ECLEVEL_L);
        * @param $str;
        * @param $version = 0;
        * @param $level = QR_ECLEVEL_L;
        * @return string
        */
        $filecontent = DCode::qrcode8bit("HELLO WORLD");
        file_put_contents("test1.png", $filecontent);
        
        /**
        * DCode::qrcodedata($sizeof, $data, $version = 0, $level = QR_ECLEVEL_L);
        * @param $sizeof
        * @param $data
        * @param $version = 0;
        * @param $level = QR_ECLEVEL_L;
        * @return string
        */
        $filecontent = DCode::qrcodedata(strlen("HELLO WORLD"), "HELLO WORLD");
        file_put_contents("test2.png", $filecontent);
        
        dcode_encrypt($src, $key = "THIS IS SHIT", $ckeylength = 8, $expire = 0);
        dcode_decrypt($src, $key = "THIS IS SHIT", $ckeylength = 8);
        
        $filecontent = dcode_qrcode("HELLO");
        file_put_contents("test.png", $filecontent);
        
        $filecontent = dcode_qrcode8bit("HELLO 8bit");
        file_put_contents("test1.png", $filecontent);
        
        $filecontent = dcode_qrcodedata(strlen("HELLO 8bit"), "HELLO 8bit");
        file_put_contents("test2.png", $filecontent);


        瀏覽 21
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        二維碼掃描和生成
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            国产九九免费 | 日本日日操 | 97香蕉久久国产超碰青草专区 | 男人天堂网在线视频观看 | www.欧美成人 | 体育生全黄h全肉短篇禁乱 | 女兵一级毛片一级毛片 | 第四色大香蕉 | 曰本理伦片午夜理伦片app | 在线无码精品秘 人口 |