PHPackages                             m1guelpf/fly-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. [HTTP &amp; Networking](/categories/http)
4. /
5. m1guelpf/fly-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

m1guelpf/fly-api
================

PHP Client for the Fly API

v1.0.2(8y ago)6183[1 PRs](https://github.com/m1guelpf/php-fly-api/pulls)MITPHPPHP ^5.5|^7.0

Since Oct 22Pushed 6y agoCompare

[ Source](https://github.com/m1guelpf/php-fly-api)[ Packagist](https://packagist.org/packages/m1guelpf/fly-api)[ Docs](https://github.com/m1guelpf/php-fly-api)[ RSS](/packages/m1guelpf-fly-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

PHP Fly.io API Client
=====================

[](#php-flyio-api-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bbbbdf2c771d4291c5f1d3bbc5e12d149787dc4f6acfc04099d25299e117850c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d316775656c70662f666c792d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/fly-api)[![Software License](https://camo.githubusercontent.com/4f8941d3c0b55808f94f2ddcd4fd3ac05f0b12295f3fd3c0aafb25507cea81ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d316775656c70662f7068702d666c792d6170692e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/6f79df1ffa8a7c44ff5245b3fa77647a6c9b3a9d66a6c72dfc36b10e1ba46ce9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d316775656c70662f7068702d666c792d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/m1guelpf/php-fly-api)[![Total Downloads](https://camo.githubusercontent.com/17501ecbd061048599b4c07f9df691ee7f1373eb5985aaaa3b16d0f3ffa6503d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d316775656c70662f666c792d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/fly-api)

This package makes it easy to interact with [the Fly.io API](https://fly.io/docs/api/).

Requirements
------------

[](#requirements)

This package requires PHP &gt;= 5.5.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require m1guelpf/fly-api
```

Usage
-----

[](#usage)

You must pass a Guzzle client and the API token to the constructor of `M1guelpf\FlyAPI\Fly`.

```
$fly = new \M1guelpf\FlyAPI\Fly('YOUR_FLY_API_TOKEN');
```

or you can skip the token and use the `connect()` method later

```
$fly = new \M1guelpf\FlyAPI\Fly();

$fly->connect('YOUR_FLY_API_TOKEN');
```

### Get Hostnames

[](#get-hostnames)

```
$fly->getHostnames($slug);
```

### Create Hostname

[](#create-hostname)

```
$fly->createHostname($slug, $hostname);
```

### Get Hostname

[](#get-hostname)

```
$fly->getHostname($slug, $hostname);
```

### Create Backend

[](#create-backend)

```
$fly->createBackend($slug, $name, $type, $settings);
```

### Create Rule

[](#create-rule)

```
$fly->createRule($slug, $hostname, $backend_id, $action_type, $path, $priority, $path_replacement);
```

### Get the Guzzle Client

[](#get-the-guzzle-client)

```
$fly->getClient();
```

### Set the Guzzle Client

[](#set-the-guzzle-client)

```
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$fly->setClient($client);
```

where $client is an instance of `\GuzzleHttp\Client`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Total

3

Last Release

3085d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (4 commits)")

---

Tags

clientflyfly-ioguzzlephpm1guelpfflyfly-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/m1guelpf-fly-api/health.svg)

```
[![Health](https://phpackages.com/badges/m1guelpf-fly-api/health.svg)](https://phpackages.com/packages/m1guelpf-fly-api)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

175.7k1](/packages/meteocontrol-vcom-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
