Download the PHP package corbpie/bunny-cdn-api without Composer

On this page you can find all versions of the php package corbpie/bunny-cdn-api. 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?
corbpie/bunny-cdn-api
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package bunny-cdn-api

BunnyNET CDN API Class

The most comprehensive, feature-packed and easy to use PHP class for bunny.net ( BunnyCDN) pull, video streaming, DNS and storage zones API.

This class whilst having a main focus on storage zone interaction includes pull zone features, DNS, Video streaming and more. Combining API with FTP managing and using your BunnyNet storage zones just got easier.

[Generic badge]() [Generic badge]()

Table of contents

1.9.7 changes

14th May 2024

Requirements

For Pull zone, billing and statistics API interaction you will need your BunnyNet API key, this is found in your dashboard in the My Account section.

The video streaming API you need the video stream library access key which is found in the settings for the library at bunny.net.

If you want to interact with storage zones you will need your BunnyCDN API key set and the name of the storage zone.

You can get this with as it returns all the storage zone data/info for the account.

Features & abilities

Usage

Install with composer:

Use like:

Setting API key:

option 1 (preferred)

Line 12

option 2

With (needs setting with each calling of class)


Storage zone interaction


Storage zone name and access key for storage zone interaction (not needed if just using pull zone functions)

Set to obtain key automatically (storage name must be accurate)

$storagename name of storage zone string

$access_key key/password to storage zone optional


List storage zones

returns array


Add a storage zone

$newstoragezone name of storage zone to create string


Delete a storage zone

$id id of storage zone to delete int


Get directory size

$dir directory to get size of string


Return current directory

returns string


Change directory

$dir directory navigation (FTP rules) string


Check folder exists

$path the folder path string

Returns bool


Check file exists

$file the full file path including the filename string

Returns bool


Move to the parent directory


Create a folder in the current directory

$new_folder Create a folder in the current directory string


Delete folder

$folder_name Name of the folder to delete (folder must be empty) string


Delete a file

$name Name of file to delete string


Delete all files in a folder

$dir Directory to delete all files in string


Rename a file

BunnyCDN does not allow for ftp_rename so file copied to a new name and then the old file is deleted.

$directory Directory that contains the file string

$old_name Object that is being renamed string

$new_name New name for object string


Move a file

$file File to move string

$move_to Directory to move file to string


Download a file

$save_as Save file as string

$get_file File to download string

$mode FTP mode to use INT


Download all files in a directory

$dir_dl_from Directory to download all from string

$dl_into Download into string

$mode FTP mode to use INT


Upload a file

$upload File to upload string

$upload_as Upload as string

$mode FTP mode to use INT


Upload all files from a local folder

$dir Upload all files from this directory string

$place Upload to string

$mode FTP mode to use INT


Return storage zone files and folder data (Original)

returns array


Return storage zone directory files formatted

$location Directory to get and return data string

returns array


Return storage zone directory folders formatted

$location Directory to get and return data string

returns array


Return storage zone directory file and folders formatted

$location Directory to get and return data string

returns array


List all pull zones and data

returns array


List pull zones data for id

$id Pull zone to get data from int

returns array


Purge pull zone data

$id Pull zone to purge int


Delete pull zone data

$id Pull zone to delete int


Lists pullzone hostnames and amount


Add hostname to pull zone

$id Pull zone hostname will be added to int

$hostname Hostname to add string


Remove a hostname from pull zone

$id Pull zone hostname be removed from int

$hostname Hostname to remove string


Change force SSL status for pull zone

$id Pull zone hostname change status int

$hostname Affected hostname string

$force_ssl True = on, FALSE = off bool


Add ip to block for pullzone


Un block an ip for pullzone


List all blocked ip's for pullzone


Purge cache for a URL

$url Purge cache for this url string

$async Dont wait for the purge before returning result bool


Pull zone logs as formatted array

$id Pull zone id int

$date Date for logs, only past 3 days (mm-dd-yy) string


Get usage statistics

returns array


Get billing data

returns array


Get account balance

returns float


Get monthly charge

returns float


Get monthly charge breakdown for region

returns array


Lists total billing amount and first date time

returns array


Apply a coupon code


Set Json header


Convert/format bytes to other data types


Convert bool to int value

returns int


Close connection (Optional)


Video streaming zone interaction

Calling and setting stream library access key


You can only get the video library id from your bunny.net stream library page Set video stream library id

$library_id stream library id int


Get video collections

Requires to be set.


Set video collection guid

$collection_guid video collection guid string


Set video guid

$video_guid video guid string


Get video collections for library id

Requires to be set.

$page page number int

$items_pp items to show int

$order_by order by string


Get streams for a collection

Requires and to be set.


Update stream collection

Requires and to be set.

$updated_collection_name the name to update video collection to string


Delete stream collection

Requires and to be set.


Create stream collection

Requires to be set.

$new_collection_name the name for your new video collection string


List videos for library

Requires to be set.

$collection_guid video collection guid string


Get video information

Requires to be set.

$collection_guid video collection guid string


Delete video

Requires to be set.

$library_id library id int

$collection_guid video collection guid string


Create video

Requires to be set.

$video_title video title string


Create video for collection

Requires and to be set.

$video_title video title string


Upload video

Requires to be set.

Need to use first to get video guid

$video_guid video guid string

$video_to_upload video filename string


Set thumbnail for video

Requires to be set.

$video_guid video guid string

$thumbnail_url image url string


Get video resolutions

Requires to be set.


Get video size

Requires to be set.


Add captions

Requires to be set.

$video_guid video guid string

$srclang caption srclang string

$label label for captions string

$captions_file caption file URL string


Delete captions

Requires to be set.

$video_guid video guid string

$srclang captions srclang string


DNS zone interaction


Get DNS all zones

$library_id stream library id int


Get DNS zone

$zone_id DNS zone id int


Add a DNS zone

$domain domain name string $logging use logging bool


Add a DNS zone full

$parameters parameters to create array


Delete DNS zone

$zone_id DNS zone id int


DNS zone statistics

$zone_id DNS zone id int


Update DNS nameservers

$zone_id DNS zone id int $custom_ns use custom nameservers bool $ns_one NS one string $ns_two NS two string


Update DNS SOA email

$zone_id DNS zone id int $soa_email NS one string


Add a DNS record by using parameters https://docs.bunny.net/reference/dnszonepublic_addrecord

$zone_id DNS zone id int $name name string $value IP address string $parameters array


Add DNS A record

$zone_id DNS zone id int $hostname hostname string $ipv4 IPv4 address string


Add DNS AAAA record

$zone_id DNS zone id int $hostname hostname string $ipv6 IPv6 address string


Add DNS CNAME record

$zone_id DNS zone id int $hostname hostname string $target string


Add DNS MX record

$zone_id DNS zone id int $hostname hostname string $mail mail server string $priority int


Add DNS TXT record

$zone_id DNS zone id int $hostname hostname string $content txt contents string


Add DNS NS record

$zone_id DNS zone id int $hostname hostname string $target string


Add DNS redirect

$zone_id DNS zone id int $hostname hostname string $url redirect to string


Update DNS A record

$zone_id DNS zone id int $dns_id DNS record id int $hostname hostname string $ipv4 ipv4 address string


Update DNS AAAA record

$zone_id DNS zone id int $dns_id DNS record id int $hostname hostname string $ipv6 ipv6 address string


Disable DNS record

$zone_id DNS zone id int $dns_id DNS record id int


Enable DNS record

$zone_id DNS zone id int $dns_id DNS record id int


Delete DNS record

$zone_id DNS zone id int $dns_id DNS record id int



All versions of bunny-cdn-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-ftp Version *
ext-curl Version *
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 corbpie/bunny-cdn-api contains the following files

Loading the files please wait ....