PHPackages                             fmtc/fmtc-php - 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. fmtc/fmtc-php

ActiveLibrary[API Development](/categories/api)

fmtc/fmtc-php
=============

A PHP package to interface with the FMTC Api

1.0.0(10y ago)2723[1 issues](https://github.com/FMTCco/fmtc-php/issues)PHP

Since Feb 5Pushed 9y ago4 watchersCompare

[ Source](https://github.com/FMTCco/fmtc-php)[ Packagist](https://packagist.org/packages/fmtc/fmtc-php)[ RSS](/packages/fmtc-fmtc-php/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (11)Used By (0)

FMTC PHP SDK
------------

[](#fmtc-php-sdk)

This is the official php package to interface with FMTC's API.

### Features

[](#features)

- Migrate the database schema
- Fetch FMTC's feeds (json): deals, categories, types, merchants and networks
- Process full and incremental feeds and store in database
- Retreive records from the database with an easy to use API

**Installation**

```
composer require fmtc/fmtc-php
```

**Requirements**

- PHP &gt;5.4
- You may need to increase timeout so the larger API calls don't fail.

```
ini_set('default_socket_timeout', 6000);
```

**Initialization**

```
$fmtc = new Fmtc\Fmtc([
	'api_key' => 'api_key',
	'database' => 'database',
	'host' => 'host',
	'username' => 'username',
	'password' => 'password'
]);
```

**Fetch JSON Feeds**

```
// Note: these methods return raw json

// Deal Feed
$fmtc->dealFeed()->fetchFull();
$fmtc->dealFeed()->fetchIncremental();

// Merchant Feed
$fmtc->merchantFeed()->fetchFull();
$fmtc->merchantFeed()->fetchIncremental();

// Category Feed
$fmtc->categoryFeed()->fetchFull();

// Type Feed
$fmtc->typeFeed()->fetchFull();

// Network Feed
$fmtc->networkFeed()->fetchFull();
```

**Migrating the Database**

```
// migrate the database
$fmtc->database()->migrate();

// rollback the migration
$fmtc->database()->rollbackMigration();
```

**Processing Feeds**

```
// Note: these methods pull down the JSON, parse it, normalize it, and store it in the database.

// Deal Feed
$fmtc->dealFeed()->processFull();
$fmtc->dealFeed()->processIncremental();

// Merchant Feed
$fmtc->merchantFeed()->processFull();
$fmtc->merchantFeed()->processIncremental();

// Category Feed
$fmtc->categoryFeed()->processFull();

// Type Feed
$fmtc->typeFeed()->processFull();

// Network Feed
$fmtc->networkFeed()->processFull();
```

**Retrieving Records**These are methods to retreive records from the database. The methods return single objects or arrays of objects. The results are sorted by rating by default.

```
// Deals
$fmtc->deals()->get($dealId);
$fmtc->deals()->all([$limit, $offset]);
$fmtc->deals()->getByCategorySlug($categorySlug, [$limit, $offset]);
$fmtc->deals()->getByTypeSlug($typeSlug, [$limit, $offset]);
$fmtc->deals()->getByMerchant($merchantId, [$limit, $offset]);
$fmtc->deals()->getByMasterMerchant($masterMerchantId, [$limit, $offset]);
$fmtc->deals()->getBySearch($searchString, [$limit, $offset]);

// Merchants
$fmtc->merchants()->get($merchantId);
$fmtc->merchants()->all();
$fmtc->merchants()->getByMasterMerchant($masterMerchantId);
$fmtc->merchants()->getBySearch($searchString);

// Categories
$fmtc->categories()->get($categorySlug);
$fmtc->categories()->all();
$fmtc->categories()->getByParent($categoryParentSlug);
$fmtc->categories()->getBySearch($searchString);

// Types
$fmtc->types()->get($typeSlug);
$fmtc->types()->all();
$fmtc->types()->getBySearch($searchString);

// Networks
$fmtc->networks()->get($networkSlug);
$fmtc->networks()->all();
$fmtc->networks()->getBySearch($searchString);

// Custom Fmtc Url
$fmtc->api()->fetchUrl($url, [$options]);
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

3749d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4608292025df3cf1d9db20c0484c7d0a3542e9a63fc681fae175e0233f1c250a?d=identicon)[calebporzio](/maintainers/calebporzio)

---

Top Contributors

[![calebporzio](https://avatars.githubusercontent.com/u/3670578?v=4)](https://github.com/calebporzio "calebporzio (21 commits)")[![antcodes](https://avatars.githubusercontent.com/u/16480682?v=4)](https://github.com/antcodes "antcodes (11 commits)")[![thenatemeyer](https://avatars.githubusercontent.com/u/2388997?v=4)](https://github.com/thenatemeyer "thenatemeyer (2 commits)")

### Embed Badge

![Health badge](/badges/fmtc-fmtc-php/health.svg)

```
[![Health](https://phpackages.com/badges/fmtc-fmtc-php/health.svg)](https://phpackages.com/packages/fmtc-fmtc-php)
```

###  Alternatives

[showdoc/showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online

12.8k7.1k](/packages/showdoc-showdoc)[essa/api-tool-kit

set of tools to build an api with laravel

53386.5k](/packages/essa-api-tool-kit)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1822.4k66](/packages/rapidez-core)

PHPackages © 2026

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