PHPackages                             adulinlin/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. [API Development](/categories/api)
4. /
5. adulinlin/cloudflare

ActiveLibrary[API Development](/categories/api)

adulinlin/cloudflare
====================

CloudFlare API - PHP

1.11.3(6y ago)09MITPHP

Since Dec 26Pushed 6y agoCompare

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

READMEChangelogDependencies (2)Versions (35)Used By (0)

Note: Please use the official Cloudflare PHP package
----------------------------------------------------

[](#note-please-use-the-official-cloudflare-php-package)

I will continue to fix bugs but there will be no futher development on this library given Cloudflare have released an official package.

You can read more about the official package here:

-
-

[![Build Status](https://camo.githubusercontent.com/499880871afec7ca5225ccf2c322cc43ba2245c1467fc446c0f0e6eb6a725753/68747470733a2f2f7472617669732d63692e6f72672f6a616d65737279616e62656c6c2f636c6f7564666c6172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jamesryanbell/cloudflare) [![Coverage Status](https://camo.githubusercontent.com/97a8b9c6bb4e32613a28800ecf76c910ca233df69d2ab40d28d3b29e2c15ad3b/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6a616d65737279616e62656c6c2f636c6f7564666c6172652e737667)](https://coveralls.io/r/jamesryanbell/cloudflare?branch=master) [![Dependency Status](https://camo.githubusercontent.com/bb02a2a8a640a1b9242fdf50d6987d5a2551d4fdd39182e4de0af693167ff53d/687474703a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533653738653936653039613432396336323030303030612f62616467652e7376673f7374796c653d666c6174)](http://www.versioneye.com/user/projects/53e78e96e09a429c6200000a) [![Latest Stable Version](https://camo.githubusercontent.com/3618f9431bb532d02612d42e807dfeadf0a5046bde5264c13cbae00f59c2ef89/68747470733a2f2f706f7365722e707567782e6f72672f6a616d65737279616e62656c6c2f636c6f7564666c6172652f762f737461626c652e737667)](https://packagist.org/packages/jamesryanbell/cloudflare) [![Total Downloads](https://camo.githubusercontent.com/a501fb6b3ac396aeb51ab91f7d31eacf0f851b0553f616d1220037cb19117bde/68747470733a2f2f706f7365722e707567782e6f72672f6a616d65737279616e62656c6c2f636c6f7564666c6172652f646f776e6c6f6164732e737667)](https://packagist.org/packages/jamesryanbell/cloudflare) [![StyleCI](https://camo.githubusercontent.com/0bc2f3dcafa540776a5ea751617f41fd37e1fc5217f90c29e7c1c0a209cf40a4/68747470733a2f2f7374796c6563692e696f2f7265706f732f32323831303737312f736869656c64)](https://styleci.io/repos/22810771) [![License](https://camo.githubusercontent.com/e8b98cbc7502d6a2ca83490e4a72cb83718ac478f970ccfc70448a12d3d1c3f9/68747470733a2f2f706f7365722e707567782e6f72672f6a616d65737279616e62656c6c2f636c6f7564666c6172652f6c6963656e73652e737667)](https://packagist.org/packages/jamesryanbell/cloudflare) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/8ee00a188d1a4e4bf402a495597bb5fccce987c515a8fd68084cec1984cbbfd7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a616d65737279616e62656c6c2f636c6f7564666c6172652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jamesryanbell/cloudflare/?branch=master)

CloudFlare API - PHP
====================

[](#cloudflare-api---php)

The documentation for the API can be found at , I will try to update this as soon as possible when new features are added to the API. If I miss one please submit a pull request.

If you spot an issue with the package just let me know via issues but please include as much detail as possible, ideally with code examples, environment information etc.

Documentation for this package can be viewed here:

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

[](#installation)

Installation should be done via composer, details of how to install composer can be found at

```
$ composer require jamesryanbell/cloudflare
```

Features
--------

[](#features)

The current feature list includes:

- DNS Records
- Zones
- Web Application Firewall (WAF)
- CloudFlare IPs
- User Administration
- Virtual DNS Management
- 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/)
- [Traffic Manager](https://www.cloudflare.com/traffic-manager/) \[BETA\]
- [Traffic Control](https://www.cloudflare.com/traffic-control/)

Usage
-----

[](#usage)

In situations where you want to make multiple calls to the API across different services it's easier to create a connection to the api first and then pass that around the other services e.g.

```
    use Cloudflare\Zone\Dns;

    // Create a connection to the Cloudflare API which you can
    // then pass into other services, e.g. DNS, later on
    $client = new Cloudflare\Api('email@example.com', 'API_KEY');

    // Create a new DNS record
    $dns = new Cloudflare\Zone\Dns($client);
    $dns->create('12345678901234567890', 'A', 'name.com', '127.0.0.1', 120);
```

If you are just performing a single action then you can connect to the API directly when you instantiate the class e.g.

```
    use Cloudflare\Zone\Dns;

    // Create a connection to the Cloudflare API which you can
    // then pass into other services, e.g. DNS, later on
    $dns = new Cloudflare\Zone\Dns('email@example.com', 'API_KEY');
    $dns->create('12345678901234567890', 'TXT', 'name.com', '127.0.0.1', 120);
```

### PageRules

[](#pagerules)

```
    use Cloudflare\Zone\Pagerules;

    // Define your targets
    // Currently you can only specify one URL per page rule but this implementation matches the API
    // so I am leaving it for now in the assumption they are planning to add multiple targets.
    $targets = [
        [
            'target' => 'url',
            'constraint' =>
            [
                'operator' => 'matches',
                'value' => 'http://example.co.uk/*'
            ]
        ]
    ];

    // Define your actions
    // Each action is held within it's own array.
    $actions = [
        [
            'id' => 'always_online',
            'value' => 'on'
        ]
    ];

    $pagerules = new Cloudflare\Zone\Pagerules('email@example.com', 'API_KEY');
    $pagerules->create($zoneId, $targets, $actions);
```

License
=======

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 84.8% 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 ~41 days

Recently: every ~195 days

Total

32

Last Release

2521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84da4eb0d1b2dda66f5a922a577ed22d626ee68f352ef0f77713a36b1a882296?d=identicon)[adulinlin](/maintainers/adulinlin)

---

Top Contributors

[![jamesryanbell](https://avatars.githubusercontent.com/u/1842481?v=4)](https://github.com/jamesryanbell "jamesryanbell (151 commits)")[![kusozayka](https://avatars.githubusercontent.com/u/363388?v=4)](https://github.com/kusozayka "kusozayka (12 commits)")[![yd-dyf](https://avatars.githubusercontent.com/u/171661250?v=4)](https://github.com/yd-dyf "yd-dyf (3 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (3 commits)")[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (2 commits)")[![benjojo](https://avatars.githubusercontent.com/u/1504626?v=4)](https://github.com/benjojo "benjojo (2 commits)")[![gassenta](https://avatars.githubusercontent.com/u/46087431?v=4)](https://github.com/gassenta "gassenta (1 commits)")[![nikolaevas](https://avatars.githubusercontent.com/u/2813477?v=4)](https://github.com/nikolaevas "nikolaevas (1 commits)")[![farnabaz](https://avatars.githubusercontent.com/u/2047945?v=4)](https://github.com/farnabaz "farnabaz (1 commits)")[![ashleyhindle](https://avatars.githubusercontent.com/u/454975?v=4)](https://github.com/ashleyhindle "ashleyhindle (1 commits)")[![AidasK](https://avatars.githubusercontent.com/u/2088484?v=4)](https://github.com/AidasK "AidasK (1 commits)")

---

Tags

apicloudflare

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sebdesign/artisan-cloudflare

Laravel artisan commands for Cloudflare

77273.8k](/packages/sebdesign-artisan-cloudflare)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[sergkeim/php-cloudflare-api

PHP Client for Cloudflare API.

196.3k](/packages/sergkeim-php-cloudflare-api)[joshuapack/laravel-cloudflare

Use the Cloudflare API for Laravel 10-12 using PHP &gt;= 8.1.

122.0k](/packages/joshuapack-laravel-cloudflare)

PHPackages © 2026

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