VarnishAdmin is a PHP Library for manage Varnish reverse proxy cache commands using PHP.
Based on timwhitlock/php-varnish
Pull request are welcome using PSR-2
VarnishAdmin is supported on PHP 5.5.* and up.
#Use To install this package, run the command below and you will get the latest version
composer require jeslopcru/varnishadmin
or include this in your composer.json
{
"require": {
"jeslopcru/varnishadmin": "dev-master"
}
}
#Example
$varnish = new VarnishAdminSocket('192.168.10.10', 6082, '4.0.3');
$varnish->purgeUrl('example.com');
$varnish->quit();
//purge postId (id = 354)
//www.example.com?id=354
$varnish = new VarnishAdminSocket();
$varnish->purgeUrl('id=354');
$varnish->quit();
The whole VarnishAdmin package, is released under the MIT license, see LICENSE.