php-core/smspva
最新稳定版本:0.0.1
Composer 安装命令:
composer require php-core/smspva
包简介
README 文档
README
SmsPva.com PHP SDK
This library requires min. PHP 8.0
Installation
composer require php-core/smspva
Examples
Get number
// require_once './vendor/autoload.php';
// Replace 'YOUR_API_KEY' with your actual API key from SMS PVA.
$apiKey = 'YOUR_API_KEY';
try {
$api = new PHPCore\SmsPva\Api($apiKey);
// Example: Getting a number for a specific service and country.
$service = 'tg'; // Service code for Telegram (tg)
$country = 'RU'; // Country code for Russia (RU)
$response = $api->getNumber($service, $country);
// Check the response to see if the request was successful.
if (isset($response['number'])) {
$number = $response['number'];
$tzid = $response['id'];
echo "Received number: $number\n";
// Perform your actions with the received number.
// ...
} else {
echo "Error: " . $response['error'] . "\n";
}
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
Other examples can be found here
For more, visit the Official SMSPVA API Documentation
License
This project is licensed under the MIT License.
统计信息
- 总下载量: 159
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-17