dev-master
9999999-dev https://github.com/biozahard/yii2-cloudflareSimple Yii2 cloudflare extension without any requirements.
LGPL-3.0+
The Requires
- yiisoft/yii2 *
- php >=5.3.0
The Development Requires
by Zakharii Fesenko
Wallogit.com
2017 © Pedro Peláez
Simple Yii2 cloudflare extension without any requirements.
Yii2 Component for CloudFlare api v4.0. https://www.cloudflare.com/, (*1)
Minimum requirements: Yii2, Curl, (*2)
Installation via Composer:, (*3)
composer require biozahard/yii2-cloudflare-api, (*4)
Configuring in config.php:, (*5)
'components' => [
//...
'cloudflare' => [
'class' => 'biozahard\cloudflare\CloudflareApi',
'apiurl' => 'https://api.cloudflare.com/client/v4/',
'authkey' => '5gds0kfdsc024ndsofsj049jisdofjsd034jw',
'authemail' => 'admin@mail.com',
'sites' => [
'mysite.com',
'thebest-country.ua',
'anotheronesite.biz',
],
],
//...
]
After this configuring you can use: \Yii::$app->cloudflare, (*6)
So, let's see some examples:, (*7)
//get the CloudFlare api component
$cf = \Yii::$app->cloudflare;
//purge cache for specific website:
$cf->purgeCache('thebest-country.ua');
//Clear the cache for the first site from the specified list:
$cf->purgeCache();
License: LGPL v3 or later, (*8)
Simple Yii2 cloudflare extension without any requirements.
LGPL-3.0+