PHPackages                             whatdafox/keycdn - 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. whatdafox/keycdn

AbandonedArchivedLibrary[API Development](/categories/api)

whatdafox/keycdn
================

KeyCDN API PHP SDK

1.0.1(9y ago)0115MITPHPPHP &gt;=7.0

Since Feb 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/WhatDaFox/KeyCDN)[ Packagist](https://packagist.org/packages/whatdafox/keycdn)[ RSS](/packages/whatdafox-keycdn/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

KeyCDN PHP SDK
==============

[](#keycdn-php-sdk)

[![Packagist](https://camo.githubusercontent.com/fa12473ad336cf5ead8380ad7d54a4c98714a00f15a13c94d1579285c83640db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776861746461666f782f6b657963646e2e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://packagist.org/packages/whatdafox/keycdn)[![Travis](https://camo.githubusercontent.com/51f32a98d179f7b3c26c60a3f10ee0fcfb3f7271561e81483526defda60db34b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f576861744461466f782f4b657943444e2f6d61737465722e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://travis-ci.org/WhatDaFox/KeyCDN)

PHP Wrapper to interact with the KeyCDN API.

Installation
------------

[](#installation)

```
composer require whatdafox/keycdn
```

Usage
-----

[](#usage)

Simply create an KeyCDN object, with a valid API Token in the constructor:

```
$keycdn = KeyCDN::create($token);
```

### Zones

[](#zones)

```
// List all zones
$keycdn->zones()->all();

// View one specific zone
$keycdn->zones()->find($zoneId);

// Add a zone
$keycdn->zones()->add('foo', 'pull', 'http://foo.com');

// Edit a zone
$keycdn->zone($zoneId)->update([
    'gzip' => 'enabled'
]);

// Delete a zone
$keycdn->zone($zoneId)->delete();

// Purge a zone
$keycdn->zone($zoneId)->purge();

// Purge URLs
$keycdn->zone($zoneId)->purge(['http://foo.com']);
$keycdn->zone($zoneId)->purgeUrls(['http://foo.com']);

// Purge Tags
$keycdn->zone($zoneId)->purge(['http://foo.com'], true);
$keycdn->zone($zoneId)->purgeTags(['http://foo.com']);
```

### Zone Aliases

[](#zone-aliases)

```
// List zone aliases
$keycdn->aliases()->all();

// Add a zone alias
$keycdn->aliases()->add($zoneId, 'cdn.foo.com');

// Edit a zone alias
$keycdn->alias($aliasId)->update([
    'name' => 'cdn.bar.com'
]);

// Delete a zone alias
$keycdn->alias($aliasId)->delete();
```

### Zone Referrers

[](#zone-referrers)

```
// List zone referrers
$keycdn->referrers()->all();

// Add a zone referrer
$keycdn->referrers()->add($zoneId, 'cdn.foo.com');

// Edit a zone referrer
$keycdn->referrer($referrerId)->update([
    'name' => 'cdn.bar.com'
]);

// Delete a zone referrer
$keycdn->referrer($referrerId)->delete();
```

### Reports

[](#reports)

*Examples using [Carbon/Carbon](http://carbon.nesbot.com/)*

```
// Traffic
$keycdn->traffic(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp);
$keycdn->traffic(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp, ZONE_ID);

// Storage
$keycdn->storage(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp);
$keycdn->storage(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp, ZONE_ID);

// Status
$keycdn->status(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp);
$keycdn->status(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp, ZONE_ID);

// Credits
$keycdn->credits(Carbon::now()->subDays(30)->timestamp, Carbon::now()->timestamp);
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~40 days

Total

2

Last Release

3372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb2efedfc92a3357d8f0a7a2b2852711e966417eefc5dcfb4ad39c4763eb7118?d=identicon)[foxted](/maintainers/foxted)

---

Top Contributors

[![foxted](https://avatars.githubusercontent.com/u/1385160?v=4)](https://github.com/foxted "foxted (11 commits)")

---

Tags

apiapi-clientapi-wrapperkeycdnphpsdksdk-phpapisdkwrappercdnkeycdn

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/whatdafox-keycdn/health.svg)

```
[![Health](https://phpackages.com/badges/whatdafox-keycdn/health.svg)](https://phpackages.com/packages/whatdafox-keycdn)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[resend/resend-php

Resend PHP library.

617.2M37](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M12](/packages/checkout-checkout-sdk-php)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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