PHP code example of sxqibo / cloudprinter

1. Go to this page and download the library: Download sxqibo/cloudprinter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sxqibo / cloudprinter example snippets


$config = [
    // 飞鹅云注册账号
    'user' => '',
    // 飞鹅云开发者 UKEY
    'ukey' => '',
    // 打印机回调地址
    'callBackUrl' => '',
];

// 打印机 SN 号
$sn = '';
// 打印内容
$content = '<C>测试打印</C>';
$content .= '<C>山西岐伯科技</C>';
// 打印几联
$times = 1;

$feie = new FeieYun($config);
$feie->printMsg($sn, $content, $times);

$config = [
    // 芯烨云注册账号
    'user' => '',
    // 芯烨云开发者 UKEY
    'ukey' => '',
    // 打印机回调地址
    'callBackUrl' => '',
];

// 打印机 SN 号
$sn = '';
// 打印内容
$content = '<C>测试打印</C>';
$content .= '<C>山西岐伯科技</C>';
// 打印几联
$times = 1;

$feie = new XpYun($config);
$feie->printMsg($sn, $content, $times);