via Composer:
composer require svenkuegler/php-nginx-status-parser
require 'vendor/autoload.php';
$p = new NginxStatusParser("http://127.0.0.1/nginx_status");
$nginxStatus = $p->parse();
var_dump($nginxStatus);
...
$ phpunit
Feel free to send pull requests or create issues if you come across problems or have great ideas. Any input is appreciated!
This code is published under the The MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.