PHPackages                             sanf/iran-bank-detector - 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. sanf/iran-bank-detector

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

sanf/iran-bank-detector
=======================

A lightweight PHP library to detect Iranian banks from card numbers.

v1.0.0(7mo ago)221[1 PRs](https://github.com/sanf-dev/iran-bank-detector/pulls)MITPHPPHP ^7.4 || ^8.0

Since Oct 1Pushed 7mo agoCompare

[ Source](https://github.com/sanf-dev/iran-bank-detector)[ Packagist](https://packagist.org/packages/sanf/iran-bank-detector)[ Docs](https://github.com/IranBankDetector)[ RSS](/packages/sanf-iran-bank-detector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

🏦 Iran Bank Detector
====================

[](#-iran-bank-detector)

This package is designed to find **Iranian bank information** based on **IBan Numbers** and **Card Prefixes**. Users can input either an IBan number or a card prefix to retrieve the related bank information (such as bank name, logo, and related colors).

[![preview](https://camo.githubusercontent.com/2fd47bf2a27cb924683def2fd0b967d524b961d1163109c457050655ba1d6728/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f73616e662d6465762f6972616e2d62616e6b2d6465746563746f722f6173736574732f707265766965772f707265766965772e706e67)](https://camo.githubusercontent.com/2fd47bf2a27cb924683def2fd0b967d524b961d1163109c457050655ba1d6728/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f73616e662d6465762f6972616e2d62616e6b2d6465746563746f722f6173736574732f707265766965772f707265766965772e706e67)

✨ Features
----------

[](#-features)

- 📑 Identify banks by **IBan Number**
- 💳 Identify banks by **Card Prefix**
- ✂️ **Automatically remove the `IR` or `ir` prefix** from the IBan number
- 🎨 **Display bank logos** and related color information

📦 Installation
--------------

[](#-installation)

To install the package, use the following command:

```
composer require sanf/iran-bank-detector
```

🧪 Usage
-------

[](#-usage)

**1. Using IBan number**To retrieve bank information by IBan, simply pass the IBan number to the **getBankByIBanCode** function. This function will automatically remove the IR or ir prefix from the IBan and return the corresponding bank.

```
require_once "vendor/autoload.php";
use iranBank\IranBankDetector;

$detector = new IranBankDetector();
$bank = $detector->getBankByIBanCode("IR020170000000000000000000");
print_r($bank);
```

**2. Using Card Prefix**To retrieve bank information by card prefix, simply pass the card number to the **getBankByCardNumber** function.

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

use iranBank\IranBankDetector;

$detector = new IranBankDetector();
$bank = $detector->getBankByCardNumber("60637311");
print_r($bank);
```

🌐 CDN Support
-------------

[](#-cdn-support)

Bank logos are served via a **CDN** to avoid the need for users to download or upload the files themselves. You can fetch the logos from the CDN links provided in return **logo** field.

📐 Recommended Logo Size
-----------------------

[](#-recommended-logo-size)

To ensure optimal display quality, we recommend using logos with a **maximum size of 72x72 pixels**.

📝 Issues and Suggestions
------------------------

[](#-issues-and-suggestions)

If you encounter any issues or have suggestions, please create a new Issue on the GitHub repositor

**power by [iran-bank-detector](https://github.com/4limirzaei/iran-bank-detector)**

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d9f455ad11c177c1b91822c1ea57abf73ccbb116629db259bbc44b556350d8c?d=identicon)[Sanf](/maintainers/Sanf)

---

Top Contributors

[![sanf-dev](https://avatars.githubusercontent.com/u/185589300?v=4)](https://github.com/sanf-dev "sanf-dev (3 commits)")

---

Tags

bankframeworkiraniran-bank-detectoriranbankdetectorphpphpBankiranIranBankDetectorIran-Bank-Detector

### Embed Badge

![Health badge](/badges/sanf-iran-bank-detector/health.svg)

```
[![Health](https://phpackages.com/badges/sanf-iran-bank-detector/health.svg)](https://phpackages.com/packages/sanf-iran-bank-detector)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)[ombapit/mutasi-bank

Scrapper untuk data mutasi bank di Indonesia

101.7k](/packages/ombapit-mutasi-bank)

PHPackages © 2026

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