PHPackages                             crasmedia/cloudflare-4 - 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. crasmedia/cloudflare-4

ActiveLibrary[API Development](/categories/api)

crasmedia/cloudflare-4
======================

PHP package for the next generation CloudFlare API

0.0.2(9y ago)027MITPHPPHP &gt;=5.4.0

Since Jan 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Crasmedia/cloudflare-4)[ Packagist](https://packagist.org/packages/crasmedia/cloudflare-4)[ Docs](https://crasmedia.com)[ RSS](/packages/crasmedia-cloudflare-4/feed)WikiDiscussions master Synced 4w ago

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

cloudflare-4
============

[](#cloudflare-4)

A PHP package for the next generation of CloudFlare API.

### Usage Overview

[](#usage-overview)

```
// Set up the request Factory
$factory = new RequestFactory();
$factory->setEmail('FooEmail');
$factory->setKey('FooKey');

// Make a request
$request = $factory->make();
// And run a response
$response = $request->zoneList();

// Alternately, `$response = $factory->zoneList();` does the same thing.

if (!$response->didSucceed()) {
    var_dump($response->getErrors());
    die('Something went wrong!');
} else {
    var_dump($response->getData());
}
```

### Available Methods

[](#available-methods)

You can pass arguments in, or simply pass an associative array as the first argument, where keys are the argument names and values are the corresponding values. Example:

```
$factory->dnsGet('a', 'b');
// is the same as...
$factory->dnsGet([['zone_id' => 'a', 'dns_id' => 'b']]);

```

This may be preferable for functions with very long argument lists.

- `ResponseInterface zoneCreate(mixed $name, bool $jump_start = null, array $organization = null)`
- `ResponseInterface zoneList(mixed $name = null, string $status = null, integer $page = null, integer $per_page = null, string $order = null, string $direction = null, string $match = null)`
- `ResponseInterface zoneGet(mixed $id)`
- `ResponseInterface zonePause(mixed $id)`
- `ResponseInterface zoneResume(mixed $id)`
- `ResponseInterface zonePurge(mixed $id, bool $purge_everything)`
- `ResponseInterface zonePurgeFiles(mixed $id, array $files = null)`
- `ResponseInterface zoneDelete(mixed $id)`
- `ResponseInterface plansList(mixed $zone_id)`
- `ResponseInterface plansGet(mixed $zone_id, string $plan_id)`
- `ResponseInterface plansSet(mixed $zone_id, string $plan_id)`
- `ResponseInterface dnsCreate(mixed $zone_id, string $type = null, string $name = null, string $content = null, integer $ttl = null)`
- `ResponseInterface dnsList(mixed $zone_id, string $name = null, string $content= null, string $vanity_name_server_record = null, integer $page = null, integer $per_page = null, string $order = null, string $direction = null, string $match = null)`
- `ResponseInterface dnsGet(mixed $zone_id, string $dns_id)`
- `ResponseInterface dnsUpdate(mixed $zone_id, string $dns_id, array $__data__)`
- `ResponseInterface dnsDelete(mixed $zone_id, string $dns_id)`

For further information about specific functions, see the [CloudFlare documentation](http://developers.cloudflare.com/next/). All of these return instances of ResponseInterface, which implements the following methods:

- `array getData()` - Returns the array of the "results" from the CloudFlare response.
- `mixed getErrors()` - Returns the array of "errors" from the CloudFlare response.
- `bool didSucceed()` - Returns the "success" of the CloudFlare response, true or false.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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 ~9 days

Total

2

Last Release

3435d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9961184?v=4)[crasmedia](/maintainers/crasmedia)[@Crasmedia](https://github.com/Crasmedia)

---

Top Contributors

[![roetker](https://avatars.githubusercontent.com/u/9840132?v=4)](https://github.com/roetker "roetker (7 commits)")[![karoun](https://avatars.githubusercontent.com/u/870701?v=4)](https://github.com/karoun "karoun (2 commits)")[![martendej](https://avatars.githubusercontent.com/u/9840109?v=4)](https://github.com/martendej "martendej (2 commits)")[![connor4312](https://avatars.githubusercontent.com/u/2230985?v=4)](https://github.com/connor4312 "connor4312 (1 commits)")

---

Tags

apiwrappercloudflare

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crasmedia-cloudflare-4/health.svg)

```
[![Health](https://phpackages.com/badges/crasmedia-cloudflare-4/health.svg)](https://phpackages.com/packages/crasmedia-cloudflare-4)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[gabrielbull/ups-api

PHP UPS API

4582.4M10](/packages/gabrielbull-ups-api)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[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)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

782.5k](/packages/walle89-swedbank-json)

PHPackages © 2026

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