2017 © Pedro Peláez
 

library cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

image

okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  • Wednesday, October 14, 2015
  • by okwinza
  • Repository
  • 2 Watchers
  • 7 Stars
  • 84,183 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

CloudFlare API

Build Status Latest Stable Version Total Downloads Latest Unstable Version Scrutinizer Code Quality Code Coverage License, (*1)

A small, compact but flexible API library for popular CDN provider CloudFlare written in PHP., (*2)

Supports both HOST and CLIENT APIs., (*3)

Docs

CloudFlare Client API documentation
CloudFlare Hosting Provider API documentation, (*4)

HOW TO

  • Get yourself an API key. You can grab one here.
  • Replace {EMAIL} and {TOKEN} with your real data.
  • Start coding.

Example

You can find some demo code in /examples dir., (*5)

But still, here are the basics:, (*6)

If you want to use CLIENT API then instantiate API object like this:, (*7)

$cf_api_client = new CF("{EMAIL}","{TOKEN}");

Otherwise just pass your {HOST_KEY} to the constructor:, (*8)

$cf_api_client = new CF("{HOST_KEY}");

And start making requests:, (*9)

    $response = $cf_api_client->rec_new(array(
        'z' => 'yoursite.com',
        'name' => 'new.yoursite.com',
        'ttl' => 1,
        'type' => 'A',
        'content' => '1.2.3.4'
    ));

Note: rec_new is a name of api method listed in docs, (*10)

Also, you can change your current EMAIL/TOKEN/HOST_KEY values at any time without re-creating the object:, (*11)

$cf_api_client->setEmail($email);
$cf_api_client->setToken($token);
$cf_api_client->setHostKey($host_key);

Installation

You can install cloudflare-api via Composer:, (*12)

composer require okwinza/cloudflare-api

Or by simple require., (*13)

Support

vk: okwinza
email: okwinza@gmail.com, (*14)

The Versions

14/10 2015

dev-master

9999999-dev https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

The Development Requires

api php rest cloudflare

14/10 2015

1.0.3

1.0.3.0 https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

The Development Requires

api php rest cloudflare

07/08 2015

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

api php rest cloudflare

07/08 2015

1.0.2

1.0.2.0 https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

api php rest cloudflare

04/08 2015

1.0.1

1.0.1.0 https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

api php rest cloudflare

04/08 2015

1.0.0

1.0.0.0 https://github.com/okwinza/cloudflare-api

Simple yet flexible PHP library for CloudFlare API.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *

 

api php rest cloudflare