Download the PHP package siberfx/bunny-cdn without Composer
On this page you can find all versions of the php package siberfx/bunny-cdn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bunny-cdn
Bunny CDN API for PHP
A PHP client for the bunny.net API: pull zones, Edge Storage (HTTP + FTP), Stream (video) and DNS,
plus a Flysystem v3 storage adapter and Laravel integration (service provider + bunnycdn disk).
Plain PHP usage of every feature is explained in NATIVE_USAGE.md, backed by the runnable examples in native-usage-docs/. Coming from
corbpie/bunny-cdn-apiorplatformcommunity/flysystem-bunnycdn? See the migration notes in CHANGELOG.md.
Requirements
- PHP 8.4, 8.5 or 8.6
ext-curl,ext-jsonguzzlehttp/guzzle7,league/flysystem3 (installed automatically)ext-ftp(optional, only for the FTP storage methods)- Laravel 12 or 13 (optional, for the service provider and
bunnycdndisk)
Installation
Package structure
Usage
Every class in Siberfx\BunnyCdn\BunnyCore extends BunnyAPI and takes the same constructor:
| Class | Covers |
|---|---|
BunnyAPI |
Account: purge URL, statistics, billing, countries, regions |
BunnyAPIPull |
Pull zones, hostnames, certificates, edge rules, logs |
BunnyAPIStorage |
Storage zone management, Edge Storage HTTP API, FTP |
BunnyAPIStream |
Stream collections and videos |
BunnyAPIDNS |
DNS zones, records, DNSSEC |
Errors
Any non-2xx response throws Siberfx\BunnyCdn\BunnyCore\BunnyAPIException:
Successful calls return the decoded JSON as an array. Empty responses (e.g. HTTP 204) return
['http_code' => 204, 'response' => null]. $bunny->lastResponse() gives the raw HttpResponse of the last request.
Custom HTTP client
All requests go through Siberfx\BunnyCdn\BunnyCore\Http\HttpClient. The default is CurlHttpClient; pass your own
implementation (e.g. for testing or a proxy) as the third constructor argument or via setHttpClient().
Laravel
The service provider is auto-discovered. Publish the config and add your keys to .env:
All classes are registered as singletons and can be injected:
bunnycdn storage disk
The provider also registers a bunnycdn filesystem driver (no Storage::extend() needed). Add a disk to
config/filesystems.php; any option you leave out falls back to the bunny-cdn.storage config above.
Account (BunnyAPI)
Pull zones (BunnyAPIPull)
Storage (BunnyAPIStorage)
Storage zone management (account API key)
Edge Storage HTTP API
Select the zone first. The primary region decides the hostname (de, uk, se, ny, la, sg, syd, br, jh).
If the zone password is omitted it is looked up with the account API key.
FTP (requires ext-ftp)
Flysystem adapter
A Flysystem v3 adapter for Edge Storage, based on platformcommunity/flysystem-bunnycdn and maintained here.
Supports read/write (strings and streams), copy, move, delete, directories, deep listing, file size, mime type, last modified, MD5/SHA256 checksums, public and signed temporary URLs, and concurrent batch uploads:
Regions: FALKENSTEIN (de), STOCKHOLM (se), UNITED_KINGDOM (uk), NEW_YORK (ny), LOS_ANGELES (la), SINGAPORE (sg),
SYDNEY (syd), BRAZIL (br), JOHANNESBURG (jh).
Migrating from platformcommunity/flysystem-bunnycdn: replace the namespace
PlatformCommunity\Flysystem\BunnyCDN with Siberfx\BunnyCdn\Flysystem; class names and constructor arguments are
unchanged. In Laravel you can drop your Storage::extend('bunnycdn', ...) code – the driver is registered for you.
Stream (BunnyAPIStream)
DNS (BunnyAPIDNS)
Testing
The Flysystem tests run against an in-memory storage mock. To run them against a real (dedicated test) storage zone,
set BUNNY_TEST_STORAGE_ZONE, BUNNY_TEST_STORAGE_KEY and optionally BUNNY_TEST_STORAGE_REGION / BUNNY_TEST_PULL_ZONE.
License
MIT, see LICENSE.
All versions of bunny-cdn with dependencies
ext-curl Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.9
league/flysystem Version ^3.29
league/mime-type-detection Version ^1.16