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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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).

[Version]() [PHP]() Tests

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-api or platformcommunity/flysystem-bunnycdn? See the migration notes in CHANGELOG.md.

Requirements

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

PHP Build Version
Package Version
Requires php Version ^8.4
ext-curl Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.9
league/flysystem Version ^3.29
league/mime-type-detection Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package siberfx/bunny-cdn contains the following files

Loading the files please wait ...