Small library for purge files on Cloudflare using the API version 4
Installation should be done via composer, details of how to install composer can be found at https://getcomposer.org/
composer require alejodaraio/cloudflare-purgefile
use CloudFlare;
try {
$cf = new CloudFlare('[email protected]', 'theKey', 'theZoneId');
$urls = array('http://mysite.com/example');
$tags = array();
$cf->purge_files($urls, $tags);
}
catch(CloudFlareException $e) {
print $e->getMessage();
}
License
MIT