alejodaraio/cloudflare-purgefile

Small library for purge files on Cloudflare using the API version 4

1.0.0 2017-01-02 16:01 UTC

README

Small library for purge files on Cloudflare using the API version 4

Coverage Status Latest Stable Version Total Downloads Daily Downloads Dependency Status

Install

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

composer require alejodaraio/cloudflare-purgefile

Usage

use CloudFlare;

try {
  $cf = new CloudFlare('email@email.com', 'theKey', 'theZoneId');
  
  $urls = array('http://mysite.com/example');
  $tags = array();
  $cf->purge_files($urls, $tags);
}
catch(CloudFlareException $e) {
  print $e->getMessage();
}

License

MIT