GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - okwinza/CloudFlare-API: CloudFlare API wrapper written in PHP

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
okw/CF
okw/CF
 
 
tests
tests
 
 
.scrutinizer.yml
.scrutinizer.yml
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
autoload.php
autoload.php
 
 
composer.json
composer.json
 
 
phpunit.php
phpunit.php
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 

Repository files navigation

CloudFlare API

Build Status Latest Stable Version Total Downloads Latest Unstable Version Scrutinizer Code Quality Code Coverage License

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

Supports both HOST and CLIENT APIs.

Docs

CloudFlare Client API documentation
CloudFlare Hosting Provider API documentation

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.

But still, here are the basics:

If you want to use CLIENT API then instantiate API object like this:

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

Otherwise just pass your {HOST_KEY} to the constructor:

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

And start making requests:

    $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

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

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

Installation

You can install cloudflare-api via Composer:

composer require okwinza/cloudflare-api

Or by simple require.

Support

vk: okwinza
email: [email protected]

About

CloudFlare API wrapper written in PHP

Resources

Readme
MIT license
Activity

Stars

8 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.