PHPackages                             carmelosantana/porkbun-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. carmelosantana/porkbun-sdk

ActiveLibrary[API Development](/categories/api)

carmelosantana/porkbun-sdk
==========================

A PHP library for interacting with the Porkbun API.

1.0.0(1y ago)1241[1 issues](https://github.com/carmelosantana/porkbun-sdk/issues)MITPHPPHP ^8.1

Since Aug 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/carmelosantana/porkbun-sdk)[ Packagist](https://packagist.org/packages/carmelosantana/porkbun-sdk)[ RSS](/packages/carmelosantana-porkbun-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Porkbun SDK for PHP
===================

[](#porkbun-sdk-for-php)

PHP library for interacting with the [Porkbun](https://porkbun.com) API.

- [Install](#install)
- [Usage](#usage)
    - [Domain](#domain)
    - [DNS](#dns)
    - [SSL](#ssl)
- [Testing](#testing)
- [Support](#support)
- [Funding](#funding)
- [Changelog](#changelog)
- [License](#license)

---

**Supports**

Interactions with [Porkbun's](https://porkbun.com) 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
-------

[](#install)

Include `PorkbunSdk` in your project with [Composer](https://getcomposer.org/):

```
composer require carmelosantana/porkbun-sdk
```

**Requirements:**

- [PHP](https://www.php.net/manual/en/install.php) 8.1 or above
- [Composer](https://getcomposer.org/)

Usage
-----

[](#usage)

To use the [Porkbun](https://porkbun.com) API, you need to have an API key and secret from [Porkbun](https://porkbun.com). You can obtain these by logging into your [Porkbun](https://porkbun.com) account and [generating an API key](https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-api).

### Domain

[](#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

[](#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

[](#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
-------

[](#testing)

To run the test suite:

```
composer test
```

**Requirements:**

- [Pest](https://pestphp.com/) is used for testing.

Support
-------

[](#support)

Community support is available on [Discord](https://discord.gg/vZunFRuDvB).

Funding
-------

[](#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](https://www.patreon.com/carmelosantana)
- PayPal: [Donate via PayPal](https://www.paypal.com/donate?hosted_button_id=WHCW333MC7CNW)

Changelog
---------

[](#changelog)

- **1.0.0** - Aug 29, 2024
    - Initial release of the `PorkbunSdk` library with support for Domain, DNS, and SSL management.

License
-------

[](#license)

Code and documentation are released under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

621d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/597820?v=4)[Carmelo Santana](/maintainers/carmelosantana)[@carmelosantana](https://github.com/carmelosantana)

---

Top Contributors

[![carmelosantana](https://avatars.githubusercontent.com/u/597820?v=4)](https://github.com/carmelosantana "carmelosantana (2 commits)")

---

Tags

phpporkbun

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/carmelosantana-porkbun-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/carmelosantana-porkbun-sdk/health.svg)](https://phpackages.com/packages/carmelosantana-porkbun-sdk)
```

###  Alternatives

[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[sandorian/moneybird-api-php

Moneybird API client for PHP

127.3k](/packages/sandorian-moneybird-api-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
