View on GitHub

cloudflare-php

Cloudflare Purge Files

Cloudflare Purge Files

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