zhongwu / printer
zhongwu cloud printer api
Installs: 17 001
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-11-20 20:59:44 UTC
README
安装 install
composer require zhongwu/printer
示例
- 打印
$app_id = '******'; $app_secret = '********'; $rpc = new \zhongwu\protocol\RpcClient($app_id, $app_secret, 'http://api.zhongwuyun.com'); $Zprinter = new \zhongwu\Printer($rpc); $device_id = '1111111'; $device_secret = '11111111'; $printdata = '中午云拥有自主研发的云打印机,提供稳定高效,高可用的云打印方案'; try { $Zprinter->set_args($device_id, $device_secret)->cloud_print($printdata); } catch (Exception $e) { }
- 设置声音
<?php $app_id = '******'; $app_secret = '********'; $rpc = new \zhongwu\protocol\RpcClient($app_id, $app_secret, 'http://api.zhongwuyun.com'); $Zprinter = new \zhongwu\Printer($rpc); $device_id = '1111111'; $device_secret = '11111111'; try { $Zprinter->set_args($device_id, $device_secret)->set_sound(1); } catch (Exception $e) { }