PHPackages                             kamermans/haproxy-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kamermans/haproxy-api

ActiveLibrary[API Development](/categories/api)

kamermans/haproxy-api
=====================

PHP API for HAProxy administration

v1.0.3(8y ago)8124.9k16GPLv3PHPPHP &gt;=5.3.0

Since Feb 7Pushed 8y ago7 watchersCompare

[ Source](https://github.com/kamermans/HAProxyAPI)[ Packagist](https://packagist.org/packages/kamermans/haproxy-api)[ Docs](https://github.com/kamermans/HAProxyAPI)[ RSS](/packages/kamermans-haproxy-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (8)Used By (0)

HAProxyAPI
==========

[](#haproxyapi)

PHP API for HAProxy administration
----------------------------------

[](#php-api-for-haproxy-administration)

[![Build Status](https://camo.githubusercontent.com/acf1a8d5ef9915a5c5869b0d96be9228b93cd86a3606cfe58934a688cafb7e20/68747470733a2f2f7472617669732d63692e6f72672f6b616d65726d616e732f484150726f78794150492e706e67)](https://travis-ci.org/kamermans/HAProxyAPI)

This PHP API lets you programatically access HAProxy for both admin and read-only commands like enabling/disabling servers, and checking the status of servers. I can communicate via HAProxy over the builtin HTTP **stats web page**, using the built-in **UNIX domain socket**, or over **TCP** if, for example, you are proxying your domain socket to a TCP socket so you can access it remotely.

The HAProxy HTTP interface only supports `Stats`, `EnableServer` and `DisableServer`, so use of the domain or TCP socket is required for all other commands.

HAProxyAPI was written by Steve Kamerman and is distributed under the GNU GPLv3 license.

---

Getting Started
===============

[](#getting-started)

Before you can use HAProxyAPI, you'll need to include the class loader. The API is PSR-0 compliant and has builtin Composer support. If you don't know what that means, you probably just want to use the included class loader, `autoload.php`:

```
