使用AlibabaCloud\Client\AlibabaCloud;
使用AlibabaCloud\Client\Exception\ClientException;
使用AlibabaCloud\Client\Exception\ServerException;
## // 下载:https://github.com/aliyun/openapi-sdk-php
// 使用方法:https://github.com/aliyun/openapi-sdk-php
// 使用方法:https://github.com/aliyun/openapi-sdk-php com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('
', '' )->regionId('cn-hangzhou') // 根据需要替换regionId->asDefaultClient();
try {$result = AliyunCloud::rpc()->product('Dyplsapi')// ->scheme('https ') // https | http->版本('2017-05-25')->操作('BindAxn')->方法('POST') ->选项(['查询' => [
],]) ->request();print_r($result->toArray());} catch (ClientException $e) {echo $e->getErrorMessage() 。 PHP_EOL;} catch (ServerException $e) {echo $e->getErrorMessage() 。 PHP_EOL;}
Array ( [Message] => OK [RequestId] => B0955ACE- D7E7-49A0-B39D-E706CD0C7802 [代码] => OK [SecretBindDTO] => 数组 ( [SecretNo] => 9501364081436 [SubsId] => 319916057719665412 ) )
返回是这样的。我需要提取[SecretNo] => 9501364081436 [SubsId] => 319916057719665412
刚刚学php麻烦大家了。###
需要提取 独立的数字号码