PHP code example of ykxiao / cloud-wh-api-sdk

1. Go to this page and download the library: Download ykxiao/cloud-wh-api-sdk 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/ */

    

ykxiao / cloud-wh-api-sdk example snippets




use CloudWhDemu\HttpClient;
$options = new CloudMonth([
   "default" => [
           'enabled' => true,
           'token' => "you-push-token",
           'timeout' => 2.0,
           'ssl_verify' => true,
           'secret' => '',
   ]
]);

$res = $options->text('Text Service SDK', 'send');

dump($res);


CLOUD_WH_ENABLED=true   #(可选)默认为开启
CLOUD_WH_TIME_OUT=      #超时时间
CLOUD_WH_SSL_VERIFY=false   #是否开启SSL验证
CLOUD_WH_SECRET=            #安全配置
shell
#成功安装后执行:
php artisan vendor:publish --provider="CloudWhDemu\HttpServiceProvider"

#会自动将cloud.php添加到您项目的配置文件当中

$res = cloud()->text('Test Service SDK', 'send');
dump($res);