PHPackages                             irkfdb/irkfdb-php-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. irkfdb/irkfdb-php-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

irkfdb/irkfdb-php-client
========================

PHP Client for Internet Rajinikanth Facts Database - irkfdb.in

1601PHP

Since Feb 9Pushed 7y ago2 watchersCompare

[ Source](https://github.com/irkfdb/irkfdb-php-client)[ Packagist](https://packagist.org/packages/irkfdb/irkfdb-php-client)[ RSS](/packages/irkfdb-irkfdb-php-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (4)Used By (0)

irkfdb.in php client [![Build Status](https://camo.githubusercontent.com/3ccc4f9eada7d504175d82b0fad00a075b3d75a335a1b989f9a19dcd48bd491d/68747470733a2f2f7472617669732d63692e6f72672f69726b6664622f69726b6664622d7068702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/irkfdb/irkfdb-php-client) [![StyleCI](https://camo.githubusercontent.com/6d6218d79a8bbcac5316b7472e326051b83cc8fae06fff8638b0d16025251d5a/68747470733a2f2f7374796c6563692e696f2f7265706f732f39363638383831392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/96688819)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#irkfdbin-php-client--)

PHP API Client for the Internet Rajinikanth Facts Database. Its a wrapper class for the free database of Rajinikanth Facts hosted by irkfdb.in

Install
-------

[](#install)

Using Composer

```
composer require irkfdb/irkfdb-php-client

```

Usage
-----

[](#usage)

To get the categories

```
require_once "vendor/autoload.php";

use Irkfdb\IrkfdbClient;

$irkfdbClient = new IrkfdbClient();
$irkfdbClient->getCategories()

```

Sample Response

```
Array
(
    [status] => OK
    [resultSet] => Array
        (
            [data] => Array
                (
                    [0] => nsfw
                    [1] => geeky
                )
        )
)

```

In case of API failure, the response would be as follows Sample Response

```
Array
(
    [status] => FAIL
    [errMessage] => ''
)

```

To get the random fact

```
$irkfdbClient = new IrkfdbClient();
$irkfdbClient->getRandomFact()

```

Sample Response

```
Array
(
    [status] => OK
    [resultSet] => Array
        (
            [data] => Array
                (
                    [0] => Array
                        (
                            [hash_id] => 9a004def16176d9a2b258a15bf898119
                            [db_id] => 426
                            [fact] => Rajinikanth writes code that optimizes itself.
                            [categories] => Array
                                (
                                    [0] => geeky
                                )
                            [sources] => Array
                                (
                                    [0] => api.icndb.com
                                    [1] => raw.githubusercontent.com/jenkinsci
                                )
                        )
                )

            [total_facts] => 9361
        )
)

```

To get the random fact from the selected category/categories

```
$irkfdbClient = new IrkfdbClient();
// random fact belonging to one category
$irkfdbClient->fromCategories('geeky')->getRandomFact();

//or for multiple categories
$irkfdbClient->fromCategories('nsfw,geeky')->getRandomFact();
or
$irkfdbClient->fromCategories(['nsfw','geeky'])->getRandomFact();

```

To exclude the fact from the particular category/categories

```
$irkfdbClient = new IrkfdbClient();
// random fact belonging to one category
$irkfdbClient->excludeCategories('geeky')->getRandomFact();

//or for multiple categories
$irkfdbClient->excludeCategories('nsfw,geeky')->getRandomFact();
or
$irkfdbClient->excludeCategories(['nsfw','geeky'])->getRandomFact();

```

Running the tests
-----------------

[](#running-the-tests)

```
./vendor/bin/phpunit --configuration phpunit.xml

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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://avatars.githubusercontent.com/u/166912?v=4)[Swapnil Sarwe](/maintainers/swapnilsarwe)[@swapnilsarwe](https://github.com/swapnilsarwe)

---

Top Contributors

[![swapnilsarwe-mnet](https://avatars.githubusercontent.com/u/120468654?v=4)](https://github.com/swapnilsarwe-mnet "swapnilsarwe-mnet (24 commits)")[![irkfdb](https://avatars.githubusercontent.com/u/17302199?v=4)](https://github.com/irkfdb "irkfdb (5 commits)")[![swapnilsarwe](https://avatars.githubusercontent.com/u/166912?v=4)](https://github.com/swapnilsarwe "swapnilsarwe (4 commits)")

---

Tags

irkfdb-inphprajinikanth-jokeswrapper

### Embed Badge

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

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

###  Alternatives

[ps/fluent-traversable

Support for operating on collections and arrays by functional way. Inspired by guava's FluentIterable, java8 Stream framework and scala stuff

2929.4k1](/packages/ps-fluent-traversable)

PHPackages © 2026

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