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

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

affcool/cloudflare
==================

PHP binding for v4 of the Cloudflare Client API. 修复bug版本

015PHP

Since Nov 24Pushed 7y agoCompare

[ Source](https://github.com/affcool/cloudflare)[ Packagist](https://packagist.org/packages/affcool/cloudflare)[ RSS](/packages/affcool-cloudflare/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cloudflare SDK (v4 API Binding for PHP 7)
=========================================

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

[![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 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/)
- 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/)

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

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fbd0b99e6c59715f2a773f1e2792614442b016ff643ad5782e6811eb0bf5b64?d=identicon)[affcool](/maintainers/affcool)

---

Top Contributors

[![affcool](https://avatars.githubusercontent.com/u/42781822?v=4)](https://github.com/affcool "affcool (2 commits)")

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/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.8M293](/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)
