PHPackages                             eugenecooper/cloudflare-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. eugenecooper/cloudflare-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

eugenecooper/cloudflare-sdk
===========================

PHP binding for v4 of the Cloudflare Client API (works with Laravel 10/11)

012PHP

Since Jan 28Pushed 1y agoCompare

[ Source](https://github.com/eugenecooper/cloudflare-php)[ Packagist](https://packagist.org/packages/eugenecooper/cloudflare-sdk)[ RSS](/packages/eugenecooper-cloudflare-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cloudflare SDK (v4 API Binding for PHP 8.1+)
============================================

[](#cloudflare-sdk-v4-api-binding-for-php-81)

(this fork works with Laravel 10/11)
====================================

[](#this-fork-works-with-laravel-1011)

[![Build Status](https://camo.githubusercontent.com/6e4d441035700a150eb6ae24f5d5c9bdda7b9264be331b10e322668ef2aec6bd/68747470733a2f2f7472617669732d63692e6f72672f636c6f7564666c6172652f636c6f7564666c6172652d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cloudflare/cloudflare-php)

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

[](#installation)

The recommended way to install this package is via the Packagist Dependency Manager ([cloudflare/sdk](https://packagist.org/packages/cloudflare/sdk)). You can get specific usage examples on the Cloudflare Knowledge Base under: [Cloudflare PHP API Binding](https://support.cloudflare.com/hc/en-us/articles/115001661191)

Cloudflare API version 4
------------------------

[](#cloudflare-api-version-4)

The Cloudflare API can be found [here](https://api.cloudflare.com/). Each API call is provided via a similarly named function within various classes in the **Cloudflare\\API\\Endpoints** namespace:

- [DNS Records](https://www.cloudflare.com/dns/)
- [DNS Analytics](https://api.cloudflare.com/#dns-analytics-table)
- Zones
- User Administration (partial)
- [Cloudflare IPs](https://www.cloudflare.com/ips/)
- [Page Rules](https://support.cloudflare.com/hc/en-us/articles/200168306-Is-there-a-tutorial-for-Page-Rules-)
- [Web Application Firewall (WAF)](https://www.cloudflare.com/waf/)
- Virtual DNS Management
- Custom hostnames
- Manage TLS settings
- Zone Lockdown and User-Agent Block rules
- Organization Administration
- [Railgun](https://www.cloudflare.com/railgun/) administration
- [Keyless SSL](https://blog.cloudflare.com/keyless-ssl-the-nitty-gritty-technical-details/)
- [Origin CA](https://blog.cloudflare.com/universal-ssl-encryption-all-the-way-to-the-origin-for-free/)
- Crypto
- Load Balancers
- Firewall Settings

Note that this repository is currently under development, additional classes and endpoints being actively added.

Getting Started
---------------

[](#getting-started)

```
$key     = new Cloudflare\API\Auth\APIKey('user@example.com', 'apiKey');
$adapter = new Cloudflare\API\Adapter\Guzzle($key);
$user    = new Cloudflare\API\Endpoints\User($adapter);

echo $user->getUserID();
```

Contributions
-------------

[](#contributions)

We welcome community contribution to this repository. [CONTRIBUTING.md](CONTRIBUTING.md) will help you start contributing.

Licensing
---------

[](#licensing)

Licensed under the 3-clause BSD license. See the [LICENSE](LICENSE) file for details.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor4

4 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/75191f939aee64e753855a3601c2180ba3d8242fe06139929e1a431c67fd2cda?d=identicon)[eugenecooper](/maintainers/eugenecooper)

---

Top Contributors

[![IcyApril](https://avatars.githubusercontent.com/u/2026099?v=4)](https://github.com/IcyApril "IcyApril (74 commits)")[![phily245](https://avatars.githubusercontent.com/u/645738?v=4)](https://github.com/phily245 "phily245 (35 commits)")[![exportsmedia](https://avatars.githubusercontent.com/u/5817656?v=4)](https://github.com/exportsmedia "exportsmedia (19 commits)")[![kleisauke](https://avatars.githubusercontent.com/u/12746591?v=4)](https://github.com/kleisauke "kleisauke (18 commits)")[![levidurfee](https://avatars.githubusercontent.com/u/10798199?v=4)](https://github.com/levidurfee "levidurfee (14 commits)")[![benedict-erwin](https://avatars.githubusercontent.com/u/3462264?v=4)](https://github.com/benedict-erwin "benedict-erwin (13 commits)")[![kanasite](https://avatars.githubusercontent.com/u/985129?v=4)](https://github.com/kanasite "kanasite (12 commits)")[![anthonysterling](https://avatars.githubusercontent.com/u/159960?v=4)](https://github.com/anthonysterling "anthonysterling (11 commits)")[![pauladams8](https://avatars.githubusercontent.com/u/37362614?v=4)](https://github.com/pauladams8 "pauladams8 (10 commits)")[![legacybetadev](https://avatars.githubusercontent.com/u/52174826?v=4)](https://github.com/legacybetadev "legacybetadev (8 commits)")[![jacobbednarz](https://avatars.githubusercontent.com/u/283234?v=4)](https://github.com/jacobbednarz "jacobbednarz (8 commits)")[![beltofte](https://avatars.githubusercontent.com/u/108249?v=4)](https://github.com/beltofte "beltofte (4 commits)")[![HemeraOne](https://avatars.githubusercontent.com/u/13874964?v=4)](https://github.com/HemeraOne "HemeraOne (3 commits)")[![thellimist](https://avatars.githubusercontent.com/u/6690196?v=4)](https://github.com/thellimist "thellimist (3 commits)")[![darinrandal](https://avatars.githubusercontent.com/u/28626802?v=4)](https://github.com/darinrandal "darinrandal (3 commits)")[![zaherg](https://avatars.githubusercontent.com/u/27624?v=4)](https://github.com/zaherg "zaherg (2 commits)")[![axelabhay](https://avatars.githubusercontent.com/u/53849656?v=4)](https://github.com/axelabhay "axelabhay (2 commits)")[![czPechy](https://avatars.githubusercontent.com/u/8396185?v=4)](https://github.com/czPechy "czPechy (2 commits)")[![eugenecooper](https://avatars.githubusercontent.com/u/8261869?v=4)](https://github.com/eugenecooper "eugenecooper (2 commits)")[![hans00](https://avatars.githubusercontent.com/u/1781902?v=4)](https://github.com/hans00 "hans00 (2 commits)")

### Embed Badge

![Health badge](/badges/eugenecooper-cloudflare-sdk/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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