2017 © Pedro Peláez
 

library cloudflare

Cloudflare API PHP wrapper

image

mcstutterfish/cloudflare

Cloudflare API PHP wrapper

  • Wednesday, July 29, 2015
  • by mcstutterfish
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,749 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 60 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Cloudflare API PHP wrapper

I'm gradually using more of Cloudflare's functionality snd adding more features. Please do submit any specific requests as it may be something I already know I need soon and can implement it., (*1)

Installation

Installation should be done via composer, details of how to install composer can be found at https://getcomposer.org/, (*2)

Add "mcstutterfish/cloudflare": "dev-master" to your composer.json file, (*3)

Run composer update to install the latest version., (*4)

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., (*5)

    use Cloudflare;
    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\Dns($client);
    $dns->create('12345678901234567890', 'TXT', '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., (*6)

    use Cloudflare;

    // 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', '127.0.0.1', 120);

License

MIT, (*7)

The Versions

29/07 2015

dev-master

9999999-dev

Cloudflare API PHP wrapper

  Sources   Download

MIT

The Development Requires

by Christopher M. Black

api cloudflare

29/07 2015

v0.1.0

0.1.0.0

Cloudflare API PHP wrapper

  Sources   Download

MIT

The Development Requires

by Christopher M. Black

api cloudflare