PHPackages                             qubit-hq/verifip - 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. [Security](/categories/security)
4. /
5. qubit-hq/verifip

ActiveLibrary[Security](/categories/security)

qubit-hq/verifip
================

Official PHP SDK for the VerifIP IP fraud scoring API

v0.2.0(1mo ago)00MITPHPPHP &gt;=8.1

Since Apr 22Pushed 1mo agoCompare

[ Source](https://github.com/qubit-hq/verifip-php)[ Packagist](https://packagist.org/packages/qubit-hq/verifip)[ RSS](/packages/qubit-hq-verifip/feed)WikiDiscussions main Synced 1w ago

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

VerifIP PHP SDK
===============

[](#verifip-php-sdk)

Official PHP SDK for the [VerifIP](https://verifip.com) IP fraud scoring API.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- ext-curl
- ext-json

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

[](#installation)

```
composer require qubit-hq/verifip
```

Quick Start
-----------

[](#quick-start)

```
use VerifIP\Client;

$client = new Client(apiKey: 'vip_your_api_key');

$result = $client->check('185.220.101.1');

echo $result->fraudScore;   // 70
echo $result->isTor;        // true
echo $result->countryCode;  // "DE"
```

Methods
-------

[](#methods)

### `check(string $ip): CheckResponse`

[](#checkstring-ip-checkresponse)

Check a single IP address for fraud risk.

```
$result = $client->check('8.8.8.8');

$result->requestId;       // string - unique request ID
$result->ip;              // string - the checked IP
$result->fraudScore;      // int    - 0-100 risk score
$result->isProxy;         // bool
$result->isVpn;           // bool
$result->isTor;           // bool
$result->isDatacenter;    // bool
$result->countryCode;     // string - ISO 3166-1 alpha-2
$result->countryName;     // string
$result->region;          // string
$result->city;            // string
$result->isp;             // string
$result->asn;             // int
$result->connectionType;  // string
$result->hostname;        // string
$result->signalBreakdown; // array
$result->error;           // ?string
```

### `checkBatch(array $ips): BatchResponse`

[](#checkbatcharray-ips-batchresponse)

Check multiple IPs in a single request (1-100 IPs). Requires Starter plan or higher.

```
$batch = $client->checkBatch(['185.220.101.1', '8.8.8.8']);

foreach ($batch->results as $result) {
    echo "{$result->ip}: {$result->fraudScore}\n";
}
```

### `health(): HealthResponse`

[](#health-healthresponse)

Check API server health. Does not require authentication.

```
$health = $client->health();

echo $health->status;        // "ok"
echo $health->version;       // "1.0.0"
echo $health->uptimeSeconds; // 3600
```

### `getRateLimit(): ?RateLimitInfo`

[](#getratelimit-ratelimitinfo)

Get rate limit info from the most recent API response.

```
$rateLimit = $client->getRateLimit();

if ($rateLimit !== null) {
    echo $rateLimit->limit;     // 1000
    echo $rateLimit->remaining; // 999
    echo $rateLimit->reset;     // DateTimeImmutable
}
```

Error Handling
--------------

[](#error-handling)

All API errors throw exceptions that extend `VerifIPException`:

```
use VerifIP\Exceptions\AuthenticationException;
use VerifIP\Exceptions\InvalidRequestException;
use VerifIP\Exceptions\RateLimitException;
use VerifIP\Exceptions\ServerException;
use VerifIP\Exceptions\VerifIPException;

try {
    $result = $client->check($ip);
} catch (AuthenticationException $e) {
    // 401/403 - invalid or disabled API key
} catch (RateLimitException $e) {
    // 429 - rate limit exceeded
    echo "Retry after: {$e->retryAfter} seconds";
} catch (InvalidRequestException $e) {
    // 400 - invalid IP, bad request
} catch (ServerException $e) {
    // 5xx - server error
} catch (VerifIPException $e) {
    // Other API errors
    echo $e->statusCode;
    echo $e->errorCode;
}
```

Configuration
-------------

[](#configuration)

```
$client = new Client(
    apiKey: 'vip_your_api_key',
    baseUrl: 'https://api.verifip.com',  // default
    timeout: 30.0,                        // seconds, default 30
    maxRetries: 3,                        // retry on 429/5xx, default 3
);
```

### Retry Behavior

[](#retry-behavior)

The client automatically retries on 429 and 5xx status codes with exponential backoff:

- Base delay: `0.5 * 2^attempt` seconds
- Maximum delay: 30 seconds
- Jitter: up to 25% of the delay is added randomly
- On 429 responses, the `retry_after` value from the API is used when available

Rate Limits
-----------

[](#rate-limits)

Rate limit headers (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`) are automatically parsed from every API response. Access them via `getRateLimit()` after any API call.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

6

Last Release

30d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c254b2db4c3a3e67d92dab1007e9a1000edf1fa33f18556a8a08a7752a7d6d67?d=identicon)[qubit-hq](/maintainers/qubit-hq)

---

Top Contributors

[![agNihit928](https://avatars.githubusercontent.com/u/141408036?v=4)](https://github.com/agNihit928 "agNihit928 (10 commits)")

---

Tags

proxysecurityIPtorfraudvpnverifip

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qubit-hq-verifip/health.svg)

```
[![Health](https://phpackages.com/badges/qubit-hq-verifip/health.svg)](https://phpackages.com/packages/qubit-hq-verifip)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k455.2M1.4k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k170.7M239](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M133](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41582.2M138](/packages/robrichards-xmlseclibs)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

85810.6M23](/packages/spatie-laravel-csp)[websoftwares/throttle

Ban identifier after certain amount of requests in a given timeframe.

1351.2k](/packages/websoftwares-throttle)

PHPackages © 2026

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