PHPackages                             davebugg/jamesryanbell\_cf\_fork - 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. davebugg/jamesryanbell\_cf\_fork

ActiveLibrary[API Development](/categories/api)

davebugg/jamesryanbell\_cf\_fork
================================

CloudFlare API - PHP

1.0.0(2y ago)06MITPHP

Since Mar 26Pushed 2y agoCompare

[ Source](https://github.com/DaveBugg/jamesryanbell-cf-fork)[ Packagist](https://packagist.org/packages/davebugg/jamesryanbell_cf_fork)[ RSS](/packages/davebugg-jamesryanbell-cf-fork/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.9% 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

829d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44900378?v=4)[Dave](/maintainers/DaveBugg)[@DaveBugg](https://github.com/DaveBugg)

---

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)")[![DaveBugg](https://avatars.githubusercontent.com/u/44900378?v=4)](https://github.com/DaveBugg "DaveBugg (5 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (3 commits)")[![benjojo](https://avatars.githubusercontent.com/u/1504626?v=4)](https://github.com/benjojo "benjojo (2 commits)")[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (2 commits)")[![gassenta](https://avatars.githubusercontent.com/u/46087431?v=4)](https://github.com/gassenta "gassenta (1 commits)")[![ashleyhindle](https://avatars.githubusercontent.com/u/454975?v=4)](https://github.com/ashleyhindle "ashleyhindle (1 commits)")[![farnabaz](https://avatars.githubusercontent.com/u/2047945?v=4)](https://github.com/farnabaz "farnabaz (1 commits)")[![AidasK](https://avatars.githubusercontent.com/u/2088484?v=4)](https://github.com/AidasK "AidasK (1 commits)")[![nikolaevas](https://avatars.githubusercontent.com/u/2813477?v=4)](https://github.com/nikolaevas "nikolaevas (1 commits)")

### Embed Badge

![Health badge](/badges/davebugg-jamesryanbell-cf-fork/health.svg)

```
[![Health](https://phpackages.com/badges/davebugg-jamesryanbell-cf-fork/health.svg)](https://phpackages.com/packages/davebugg-jamesryanbell-cf-fork)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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