PHPackages                             miguilim/antibotlinks - 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. miguilim/antibotlinks

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

miguilim/antibotlinks
=====================

An easy to install self-hosted image captcha library implemented with PHP + InterventionImage.

2.0.1(1y ago)184.7k4[1 issues](https://github.com/miguilimzero/antibotlinks/issues)MITPHPPHP ^8.0

Since Oct 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/miguilimzero/antibotlinks)[ Packagist](https://packagist.org/packages/miguilim/antibotlinks)[ RSS](/packages/miguilim-antibotlinks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

AntiBotLinks
============

[](#antibotlinks)

AntiBotLinks is an easy to install self-hosted image captcha library. Through a predefined dictionary, the library generates images that must be selected in a specific order.

This captcha solution may not be 100% secure against bots, but in combination with other popular captcha services, it will be an extra layer of security for your platform.

[![example](https://user-images.githubusercontent.com/35383529/220480833-dcd2b516-9b85-4944-8464-6a6f8d92fdb2.jpg)](https://user-images.githubusercontent.com/35383529/220480833-dcd2b516-9b85-4944-8464-6a6f8d92fdb2.jpg)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
- [Cache Adapters](#cache-adapters)
- [Generate Links](#generate-links)
- [Validate Answer](#validate-answer)
- [Flush Links](#flush-links)
- [Customize Options](#customize-options)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require miguilim/antibotlinks
```

Usage
-----

[](#usage)

To get started with the package, you must use the `make()` static method and pass as first parameter an identifier string. This identifier parameter will be used to store &amp; get the generated challenge and solution.

```
Use Miguilim\AntiBotLinks\AntiBotLinks;
use Miguilim\AntiBotLinks\CacheAdapters\SimpleFileCacheAdapter;

$antibotlinks = AntiBotLinks::make('1', new SimpleFileCacheAdapter(__DIR__ . '/cache'));

var_dump($antibotlinks->generateLinks());
```

> Generally you should use the user id, ip address, or a generated cookie.

Cache Adapters
--------------

[](#cache-adapters)

In order to use the AntiBotLinks class, you will need to choose a cache adapter so it can store the generated challenges somewhere. The package ships by default with the following adapters:

- `\Miguilim\AntiBotLinks\CacheAdapters\LaravelCacheAdapter`
- `\Miguilim\AntiBotLinks\CacheAdapters\SimpleFileCacheAdapter`

However, you can create and use your own adapter extending the abstract adapter class:

```
use Miguilim\AntiBotLinks\CacheAdapters\AbstractCacheAdapter;

class MyCustomCacheAdapter extends AbstractCacheAdapter
{
    public function remember(string $key, int $expiresIn, callable $callback): mixed
    {
        //
    }

    public function get(string $key): mixed
    {
        //
    }

    public function forget(string $key): bool
    {
        //
    }
}
```

Generate Links
--------------

[](#generate-links)

You can generate / retrieve captcha links using the `generateLinks()` method. You can pass as first parameter the amount of links to generate. This method gets the generated links value from the cache, and generate if links are not found.

```
$links = $antibotlinks->generateLinks(amount: 3);
```

Validate Answer
---------------

[](#validate-answer)

You can validate the user answer with the `validateAnswer()` method.

```
$antibotlinks->validateAnswer($answer);
```

Flush Links
-----------

[](#flush-links)

You can flush the current cache value and force re-generate a new captcha challenge. *It's highly recommended to use this method when the user sends a wrong a answer.*

```
$antibotlinks->flushLinks();
```

Customize Options
-----------------

[](#customize-options)

There are some few options that you can enable / disable when generating AntiBotLinks image.

```
// Enable or Disable image noise (Default: true)
$antibotlinks->noise(value: false);

// Enable or Disable image background (Default: false)
$antibotlinks->background(value: true);

// Enable or Disable dark theme (Default: false)
$antibotlinks->darkTheme(value: true);
```

You can also customize the word universe. You can overwrite the word universe or merge your array with the default one.

```
$wordUniverse = [...];

$antibotlinks->wordUniverse($wordUniverse);
// Or...
$antibotlinks->mergeWordUniverse($wordUniverse);
```

License
-------

[](#license)

AntiBotLinks is open-sourced software licensed under the [MIT license](LICENSE).

> This Library is inspired by "AntiBotLinks" from FBU Script created by MakeJar.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

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

Recently: every ~113 days

Total

11

Last Release

555d ago

Major Versions

0.2.0 → 1.0.02023-08-07

1.0.1 → 2.0.02024-10-27

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/miguilim-antibotlinks/health.svg)

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

###  Alternatives

[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[yohang88/letter-avatar

Generate user avatar using name initials letter.

126529.5k2](/packages/yohang88-letter-avatar)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[a6digital/laravel-default-profile-image

Laravel package to create default profile image using name of user.

41319.9k](/packages/a6digital-laravel-default-profile-image)

PHPackages © 2026

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