carmelosantana/porkbun-sdk
最新稳定版本:1.0.0
Composer 安装命令:
composer require carmelosantana/porkbun-sdk
包简介
A PHP library for interacting with the Porkbun API.
README 文档
README
PHP library for interacting with the Porkbun API.
Supports
Interactions with Porkbun's API for;
- Domain management
- DNS record management
- SSL certificate retrieval
Features
- Manage domains: Update name servers, list domains, and more.
- Handle DNS records: Create, edit, retrieve, and delete DNS records.
- Manage SSL certificates: Retrieve SSL certificate bundles for your domains.
Install
Include PorkbunSdk in your project with Composer:
composer require carmelosantana/porkbun-sdk
Requirements:
Usage
To use the Porkbun API, you need to have an API key and secret from Porkbun. You can obtain these by logging into your Porkbun account and generating an API key.
Domain
✅ Update the name servers for a domain.
$domain = new PorkbunSdk\Domain('your_api_key', 'your_secret_api_key'); $response = $domain->updateNameServers('example.com', [ 'ns1.example.com', 'ns2.example.com' ]); print_r($response);
DNS
✅ Create a new DNS A record for a domain.
$dns = new PorkbunSdk\DNS('your_api_key', 'your_secret_api_key'); $response = $dns->createRecord('example.com', 'A', '1.1.1.1', 'www'); print_r($response);
SSL
✅ Retrieve the SSL certificate bundle for a domain.
$ssl = new PorkbunSdk\SSL('your_api_key', 'your_secret_api_key'); $response = $ssl->getCertificate('example.com'); print_r($response);
Testing
To run the test suite:
composer test
Requirements:
- Pest is used for testing.
Support
Community support is available on Discord.
Funding
If you find this project useful or use it in a commercial environment, please consider donating:
- Bitcoin:
bc1qhxu9yf9g5jkazy6h4ux6c2apakfr90g2rkwu45 - Ethereum:
0x9f5D6dd018758891668BF2AC547D38515140460f - Patreon: patreon.com/carmelosantana
- PayPal: Donate via PayPal
Changelog
- 1.0.0 - Aug 29, 2024
- Initial release of the
PorkbunSdklibrary with support for Domain, DNS, and SSL management.
- Initial release of the
License
Code and documentation are released under the MIT License.
统计信息
- 总下载量: 211
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-29