PHPackages                             ml/fgc-client - 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. ml/fgc-client

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

ml/fgc-client
=============

HTTPlug-conformant file\_get\_contents HTTP client

1.0.1(10y ago)121MITPHPPHP &gt;=5.4

Since Jan 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lanthaler/fgc-client)[ Packagist](https://packagist.org/packages/ml/fgc-client)[ Docs](http://www.markus-lanthaler.com)[ RSS](/packages/ml-fgc-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

file\_get\_contents HTTP client
===============================

[](#file_get_contents-http-client)

[![Build Status](https://camo.githubusercontent.com/5cb5fab7ca5fa3307b1a7f2f3e3457aa38261927b7028a675a0e3b36ac40c85f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6c616e7468616c65722f6667632d636c69656e742e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/lanthaler/fgc-client)[![Code Coverage](https://camo.githubusercontent.com/ed200ef051cc7f9cdb283b8b2720093f3c205cae0ca5d108703011f1e8e75d45/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616e7468616c65722f6667632d636c69656e742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lanthaler/fgc-client/?branch=master)

This is a HTTPlug-conformant HTTP client based on `file_get_contents`.

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

[](#installation)

The easiest way to use `fgc-client` is to integrate it as a dependency in your project's [composer.json](http://getcomposer.org/doc/00-intro.md) file:

```
php composer.phar require ml/fgc-client ^1.0

```

Please note that HTTPlug hasn't released a stable version yet. Thus, for the time being, you need to set the minimum stability in your `composer.json`file to `beta`:

```
{
    ...
    "minimum-stability": "beta",
    "require": {
        ...
}

```

Usage
-----

[](#usage)

After having installed the desired dependencies

```
php composer.phar require guzzlehttp/psr7 ^1.0 php-http/message ^0.2

```

issuing an HTTP request is quite straightforward:

```
require_once('vendor/autoload.php');

use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory;
use ML\FgcClient\FgcHttpClient;

$messageFactory = new GuzzleMessageFactory();
$client = new FgcHttpClient($messageFactory, new GuzzleStreamFactory());

$request = $messageFactory->createRequest('GET', 'http://example.com/');
$response = $client->sendRequest($request);

echo $response->getStatusCode();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

3784d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb56bb436cdb5cb935166961547ecfaf85955077552ba8d5145bcd7af3126e07?d=identicon)[markus](/maintainers/markus)

---

Top Contributors

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

---

Tags

httphttpsresthttplugweb-apiphp-httpfile\_get\_contents

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ml-fgc-client/health.svg)

```
[![Health](https://phpackages.com/badges/ml-fgc-client/health.svg)](https://phpackages.com/packages/ml-fgc-client)
```

###  Alternatives

[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.0k225.5M571](/packages/php-http-client-common)[php-http/httplug-bundle

Symfony integration for HTTPlug

38921.0M54](/packages/php-http-httplug-bundle)[mashape/unirest-php

Unirest PHP

1.3k9.7M161](/packages/mashape-unirest-php)[padraic/humbug_get_contents

Secure wrapper for accessing HTTPS resources with file\_get\_contents for PHP 5.3+

1255.3M5](/packages/padraic-humbug-get-contents)[apimatic/unirest-php

Unirest PHP

224.7M116](/packages/apimatic-unirest-php)[php-http/laravel-httplug

Laravel package to integrate the Httplug generic HTTP client into Laravel

12110.1k](/packages/php-http-laravel-httplug)

PHPackages © 2026

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