This package is abandoned and no longer maintained. No replacement package was suggested.

A CakePHP component to use the CloudFlare in PHP

Installs: 2 855

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1


dev-master 2014-04-19 14:02 UTC

This package is auto-updated.

Last update: 2020-02-17 20:44:01 UTC


This plugin is a (very) thin veil over vexxhost's CloudFlare-API for use in CakePHP controllers. Please use composer to install so that the required dependencies are installed

Composer Installation

  • Add to composer, this will also install the Amazon SDK for PHP as a dependency

      "ali1/cakephp-cloudflare-api": "dev-master"

Non-composer Installation


  • You must add configuration to bootstrap.php.

      Configure::write('', 'CLOUDFLARE EMAIL');
      Configure::write('CloudFlareApi.apiKey', 'CLOUDFLARE API KEY');
    • Don't forget to replace the placeholder text with your actual keys!
  • Add the component to a controller

      public $components = array('CloudFlareApi.CloudFlareApi');


  • Remove a file from the cache

      $this->CloudFlareApi->zone_file_purge('', '');
  • From a model or shell

      if (!isset($this->CloudFlareApi)) {
      	App::import('Component', 'CloudFlareApi.CloudFlareApi');
      	$collection = new ComponentCollection();
      	$Controller =& new Controller();
      	$this->CloudFlareApi = new CloudFlareApiComponent($collection);
      $this->CloudFlareApi->zone_file_purge('', '');
  • From a console

    Console/cake fpurge_ts Console/cake zone_file_purge


You can find the method definitions here: