PHPackages                             fylmtm/maxmind-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. fylmtm/maxmind-api

AbandonedArchivedLibrary

fylmtm/maxmind-api
==================

Maxmind API library

110.3k1PHP

Since Mar 3Pushed 12y ago1 watchersCompare

[ Source](https://github.com/FylmTM/maxmind-api-php)[ Packagist](https://packagist.org/packages/fylmtm/maxmind-api)[ RSS](/packages/fylmtm-maxmind-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Maxmind API
===========

[](#maxmind-api)

[![Build Status](https://camo.githubusercontent.com/11ceeed4ec7e6ebb5a3b639a6930091e912ecb342ee0b86079de769c20f94917/68747470733a2f2f7472617669732d63692e6f72672f46796c6d544d2f6d61786d696e642d6170692d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/FylmTM/maxmind-api-php)[![Coverage Status](https://camo.githubusercontent.com/051ceb7ba06b3a28a466a91086ff566e5649a128580cc3a05d42cd3f65052255/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f46796c6d544d2f6d61786d696e642d6170692d7068702f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/FylmTM/maxmind-api-php?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/5a1ad3933a366c7bada7b99370fb25b9317763f9c3b1400d9991f16032dabd1c/68747470733a2f2f706f7365722e707567782e6f72672f66796c6d746d2f6d61786d696e642d6170692f762f737461626c652e706e67)](https://packagist.org/packages/fylmtm/maxmind-api)[![Total Downloads](https://camo.githubusercontent.com/e63d1bb34b7c88a1dbe3d8979b62640274b7afcf4757f0174abc787981f1ab39/68747470733a2f2f706f7365722e707567782e6f72672f66796c6d746d2f6d61786d696e642d6170692f646f776e6c6f6164732e706e67)](https://packagist.org/packages/fylmtm/maxmind-api)[![Latest Unstable Version](https://camo.githubusercontent.com/912ce5669797ac49308a8084b58f1a189aec614b68c262e7eb322b70ebe1ef5a/68747470733a2f2f706f7365722e707567782e6f72672f66796c6d746d2f6d61786d696e642d6170692f762f756e737461626c652e706e67)](https://packagist.org/packages/fylmtm/maxmind-api)[![License](https://camo.githubusercontent.com/7f9d77b554034c325cce86e6759ed25b50d63c9e84eb1599a9324c34b15fcc74/68747470733a2f2f706f7365722e707567782e6f72672f66796c6d746d2f6d61786d696e642d6170692f6c6963656e73652e706e67)](https://packagist.org/packages/fylmtm/maxmind-api)

About
=====

[](#about)

**Author**: Dmitry Vrublevskis

**Email**:

Installation
============

[](#installation)

### Composer

[](#composer)

Recommended way of installation is through [composer](http://getcomposer.org/). Add to your composer.json:

```
"require": {
    "fylmtm/maxmind-api": "0.1.*@dev"
}
```

And then install with:

```
$ composer.phar install
```

### Manual

[](#manual)

You can manually download library and use autoloader.

```
require_once 'lib/autoloader.php'
```

Usage
=====

[](#usage)

MinFraud client
---------------

[](#minfraud-client)

Create client:

```
$fraudClient = new Maxmind\MinFraud\MinFraudClient();
```

By default main server used. You can choose whatever you want:

```
$fraudClient->setServer(\Maxmind\MinFraud\MinFraudServers::MAIN);
$fraudClient->setServer(\Maxmind\MinFraud\MinFraudServers::US_EAST);
$fraudClient->setServer(\Maxmind\MinFraud\MinFraudServers::US_WEST);
```

HTTPS used by default. You can turn on/off https usage:

```
$fraudClient->enableHttps(false);
```

MinFraud request
----------------

[](#minfraud-request)

[minFraud API reference](http://dev.maxmind.com/minfraud/)

You need to create request, which you pass to fraudClient later. Required request fields must be passed on client creation. By default `standard` request type used.

```
// Exception may be thrown, if any of required fields will not be passed.
$request = new Maxmind\MinFraud\MinFraudRequest([
    'license_key' => '1111111',
    'i'           => '257.257.257.257',
    'city'        => 'BigApple',
    'region'      => 'NA',
    'postal'      => '1111',
    'country'     => 'NA',
]);
$request->setRequestType('standard'); // 'standard' or 'premium' request type can be used.
```

Other fields (see API reference for more info) can be passed separately.

```
$request->setShippingAddress([
    'shipAddr' => '',
    'shipCity' => '',
    'shipRegion' => '',
    'shipPostal' => '',
    'shipCountry' => ''
]);
$request->setUserData([
    'domain' => '',
    'custPhone' => '',
    'emailMD5' => '',
    'usernameMD5' => '',
    'passwordMD5' => ''
]);
$request->setBinRelated([
    'bin' => '',
    'binName' => '',
    'binPhone' => ''
]);
$request->setTransactionLinking([
    'sessionID' => '',
    'user_agent' => '',
    'accept_language' => ''
]);
$request->setTransactionInformation([
    'txnID' => '',
    'order_amount' => '',
    'order_currency' => '',
    'shopID' => '',
    'txn_type' => ''
]);
$request->setCreditCardCheck([
    'avs_result' => '',
    'cvv_result' => ''
]);
$request->setMisc([
    'forwardedIP' => ''
]);
```

MinFraud response
-----------------

[](#minfraud-response)

Request can be executed via client.

```
$response = $fraudClient->executeRequest($request);
$response->getIsCurlSuccessful(); // true|false - indicates if curl was successfull
$response->getRawResult(); // string - raw curl response, contains error if curl was unsuccessful
$response->getResult(); // parsed minFraud response
```

Tests
=====

[](#tests)

If you wish to run tests, you need to install development dependencies:

```
$ composer.phar install --dev
```

And then run them with:

```
$ vendor/bin/phpunit
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![FylmTM](https://avatars.githubusercontent.com/u/626772?v=4)](https://github.com/FylmTM "FylmTM (24 commits)")[![oschwald](https://avatars.githubusercontent.com/u/278835?v=4)](https://github.com/oschwald "oschwald (2 commits)")

### Embed Badge

![Health badge](/badges/fylmtm-maxmind-api/health.svg)

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

PHPackages © 2026

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