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

ActiveLibrary[API Development](/categories/api)

reolservices/cloudflare
=======================

A Yii2 extension to communicate with CloudFlare API V1 and manage DNS records

1.0.0(10y ago)13.8k1LGPL-3.0+PHPPHP &gt;=5.3.2

Since Sep 3Pushed 10y ago5 watchersCompare

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

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

Cloudflare
==========

[](#cloudflare)

This extension implements a few functionalities of the Cloudflare API v1. Even if this API is deprecated and it is recommended to uyse the API v4, it is (and will be) still supported and allows the use of GET requests only. This extension in its current version allows a user to retrieve the main information about a specific domain registered on a Cloudflare account, add a new domain (or any DNS record) or delete a subdomain (or any DNS record except main domains, for security reasons).

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

[](#installation)

Using the Cloudflare client with composer is quite easy. Just add the following to your composer.json file:

```
    "require-dev": {
        ...
        "reolservices/cloudflare": "*",
        ...
    }
```

Then run composer update to get the extension integrated to your application.

Usage
-----

[](#usage)

Just add reolservices/cloudflare to your projects requirements. You will need to add your Cloudflare credentials to your configuration as follows:

```
$config = [
    ...
    'params' => [
        ...
        'cloudflare' => [
            "cloudflare_auth_email" => "email@domain.com",
            "cloudflare_auth_key" => "YOUR_AUTH_KEY_HERE",
        ],
        ...
    ],
    ...
];
```

And use some code like this one:

```
    // Initialize the client
    $cfClient = new \Cloudflare\Client();

    // Retrieve the lise of all DNS records for a given domain that is registered in your Cloudflare account
    $domains = $cfClient->getDNSRecords('example.com');

    // Retrieve the list of 'A' records for a given subdomain
    $subDomains = $cfClient->getDNSRecords('sub.example.com', 'A');

    // Add a new Subdomain (A record) to your Cloudflare DNS records
    $newDomain = $cfClient->addDNSRecord('new.sub.example.com', '1.2.3.4');

    // Add a new CNAME / MX record to your Cloudflare DNS records
    $newCNAME = $cfClient->addDNSRecord('other.sub.example.com', 'new.sub.example.com', 'CNAME');
    $newMX = $cfClient->addDNSRecord('new.sub.example.com', '1.2.3.4', 'MX');

    // Remove an MX DNS record from your DNS records for a given (sub)domain
    $deleteMX = $cfClient->deleteDNSRecords('new.sub.example.com', 'MX');

    // Remove all DNS records for a given (sub)domain
    // This is not allowed on top level domains for security reasons
    // if you want to do it anyway, please connect to your Cloudflare console
    $deleteDomain = $cfClient->deleteDNSRecords('sub.example.com');
```

### Hacking the library

[](#hacking-the-library)

This is a free/libre library under license LGPL v3 or later. Your pull requests and/or feedback is very welcome!

### Contributors

[](#contributors)

Created by the ReolServices Edge Team, Renaud Tilte, Simith D'Oliveira, and contributors.

We are looking forward to your contributions and pull requests!

Tests
-----

[](#tests)

Coming soon

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3947d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93cc6b4fb6d1e8bbd851334bdfbe91e17988bfc39cdccda7f1f68117e34019b4?d=identicon)[Renaud Tilte](/maintainers/Renaud%20Tilte)

---

Top Contributors

[![rtilte-reol](https://avatars.githubusercontent.com/u/11410554?v=4)](https://github.com/rtilte-reol "rtilte-reol (7 commits)")

---

Tags

cloudflare v1

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1143.6k1](/packages/skeeks-yii2-google-api)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

133.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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