PHPackages                             arraypress/proxycheck - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. arraypress/proxycheck

ActiveLibrary[HTTP &amp; Networking](/categories/http)

arraypress/proxycheck
=====================

A PHP library for integrating with the ProxyCheck.io API in WordPress, providing proxy &amp; VPN detection, disposable email verification, geolocation, and risk assessment. Features comprehensive response handling and WordPress transient caching.

122PHP

Since Jan 6Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ProxyCheck Library for WordPress
================================

[](#proxycheck-library-for-wordpress)

A comprehensive WordPress library for ProxyCheck.io integration, providing proxy &amp; VPN detection, email verification, risk assessment, and complete dashboard management with intelligent caching.

Features
--------

[](#features)

- 🔍 **IP Analysis**: Detect proxies, VPNs, and assess risk levels
- ✉️ **Email Verification**: Check for disposable email services
- 📊 **Usage Analytics**: Track and manage API usage and quotas
- 📋 **List Management**: Handle whitelists, blocklists, and CORS origins
- 📈 **Statistics**: Access detection history and query analytics
- 🏷️ **Tag Management**: Track and analyze tagged queries
- 💾 **Smart Caching**: Optimize performance and reduce API calls

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

[](#requirements)

- PHP 7.4 or later
- WordPress 6.7.1 or later
- ProxyCheck.io API key
- Dashboard API Access enabled (for dashboard features)

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

[](#installation)

Install via Composer:

```
composer require arraypress/proxycheck
```

Basic Usage
-----------

[](#basic-usage)

```
use ArrayPress\ProxyCheck\Client;

// Initialize with API key
$client = new Client(
    'your-key-here',    // API key
    true,               // Enable caching (optional)
    600,                // Cache duration in seconds (optional)
    'custom_prefix_'    // Cache prefix (optional)
);

// Check single IP
$result = $client->check_ip( '1.1.1.1' );

// Check multiple IPs
$results = $client->check_ips( [ '1.1.1.1', '8.8.8.8' ] );

// Check email
$email = $client->check_email( 'test@example.com', true ); // Second param enables email masking
```

Configuration Methods
---------------------

[](#configuration-methods)

### VPN &amp; Proxy Settings

[](#vpn--proxy-settings)

```
// Configure VPN detection
$client->set_vpn( true );     // Enable VPN detection
$client->get_vpn();           // Check if VPN detection is enabled

// Configure ASN lookups
$client->set_asn( true );     // Enable ASN data inclusion
$client->get_asn();           // Check if ASN lookups are enabled

// Configure risk assessment
$client->set_risk( 2 );       // Set risk assessment level (0-2)
$client->get_risk();          // Get current risk assessment level

// Configure port checking
$client->set_port( true );    // Enable port checking
$client->get_port();          // Check if port checking is enabled

// Configure time seen data
$client->set_seen( true );    // Enable last seen data
$client->get_seen();          // Check if last seen data is enabled

// Configure history period
$client->set_days( 7 );       // Set history period in days
$client->get_days();          // Get current history period setting
```

Core Features
-------------

[](#core-features)

### IP &amp; Email Detection

[](#ip--email-detection)

#### Checking IPs

[](#checking-ips)

```
// Basic check with default options
$result = $client->check_ip( '1.1.1.1' );

// Check with custom options
$result = $client->check_ip( '1.1.1.1', [
    'vpn'  => 1,    // Enable VPN detection
    'asn'  => 1,    // Include ASN data
    'risk' => 2,    // Include attack history
    'port' => 1,    // Check port
    'seen' => 1,    // Include last seen
    'days' => 7     // History period
] );

// Batch check multiple IPs
$results = $client->check_ips( [ '1.1.1.1', '8.8.8.8' ] );

// Access results
if ( $result->is_proxy() ) {
    echo "Proxy detected! Type: " . $result->get_type();
    echo "Risk score: " . $result->get_risk_score();
}
```

#### Checking Emails

[](#checking-emails)

```
// Check disposable email
$result = $client->check_email( 'test@example.com' );

// With privacy masking
$result = $client->check_email( 'user@example.com', true ); // Masks as anonymous@example.com

if ( $result->is_disposable() ) {
    echo "Disposable email detected!";
}
```

### Dashboard Management

[](#dashboard-management)

#### Usage &amp; Statistics

[](#usage--statistics)

```
// Get usage information
$usage = $client->get_formatted_usage();
echo "Used today: " . $usage['used'] . " of " . $usage['limit'];
echo "Plan: " . $usage['plan'];

// Quick usage checks
$used = $client->get_used_tokens();
$remaining = $client->get_remaining_tokens();
$is_exceeded = $client->is_token_limit_exceeded();

// Get detailed query statistics
$stats = $client->get_formatted_queries( 7 ); // Last 7 days
print_r( $stats['summary'] );
```

#### List Management

[](#list-management)

```
// Whitelist Management
$client->get_whitelist();
$client->add_to_whitelist( '1.1.1.1' );
$client->add_to_whitelist( ['1.1.1.1', '2.2.2.2' ] );
$client->remove_from_whitelist( '1.1.1.1' );
$client->set_whitelist( ['1.1.1.1', '2.2.2.2' ] ); // Replace all
$client->clear_whitelist();

// Blocklist Management
$client->get_blacklist();
$client->add_to_blacklist( '1.1.1.1' );
$client->remove_from_blacklist( '1.1.1.1' );
$client->set_blacklist( ['1.1.1.1', '2.2.2.2' ] );
$client->clear_blacklist();

// CORS Origins Management
$client->get_cors_origins();
$client->add_cors_origins( 'https://example.com' );
$client->remove_cors_origins( 'https://example.com' );
$client->set_cors_origins( [ 'https://example.com', 'https://test.com' ] );
$client->clear_cors_origins();
```

#### Detection Analytics

[](#detection-analytics)

```
// Get recent detections
$detections = $client->get_formatted_detections( 100 ); // Last 100 entries

// Get detections with pagination
$detections = $client->get_formatted_detections( 100, 50 ); // 100 entries starting from offset 50

// Force bypass cache for fresh data
$detections = $client->get_formatted_detections( 100, 0, true ); // Bypass cache

// Get tagged queries
$tags = $client->get_formatted_tags( [
    'limit' => 100,
    'days' => 7,
    'addresses' => true
] );
```

Response Formats
----------------

[](#response-formats)

### IP Check Response

[](#ip-check-response)

```
// Basic Information
$ip = $result->get_ip();
$is_proxy = $result->is_proxy();
$type = $result->get_type();
$risk = $result->get_risk_score();
$is_vpn = $result->is_vpn();

// Attack History
$attacks = $result->get_attack_history();

// Network Information
$port = $result->get_port();
$seen = $result->get_last_seen();
$operator = $result->get_operator();
$operator_details = $result->get_operator_details(); // Full details including protocols

// Location Information
$continent = $result->get_continent();
$country = $result->get_country();
$region = $result->get_region();
$city = $result->get_city();
$coordinates = $result->get_coordinates();
$timezone = $result->get_timezone();
$currency = $result->get_currency();

// Block Status
$should_block = $result->should_block();
$block_reason = $result->get_block_reason();
$block_details = $result->get_block_details();
```

### Usage Statistics Response

[](#usage-statistics-response)

```
[
    'used' => 1234,              // Queries used today
    'limit' => 5000,             // Daily query limit
    'total' => 50000,            // Total queries made
    'plan' => 'Premium',         // Account tier
    'burst_available' => 100,    // Available burst tokens
    'burst_limit' => 1000,       // Burst token allowance
    'percentage' => 24.68,       // Usage percentage
    'remaining' => 3766          // Remaining queries
]
```

### Query Statistics Response

[](#query-statistics-response)

```
[
    'period' => 7,               // Days included
    'days' => [                  // Daily statistics
        [
            'day' => 'TODAY',
            'proxies' => 10,
            'vpns' => 5,
            'undetected' => 85,
            'total_queries' => 100
            // ... more metrics
        ]
    ],
    'totals' => [               // Period totals
        'proxies' => 50,
        'vpns' => 25,
        // ... more totals
    ],
    'percentages' => [          // Usage percentages
        'proxies' => 15.5,
        'vpns' => 7.8,
        // ... more percentages
    ],
    'summary' => [              // Overview
        'period_days' => 7,
        'active_days' => 5,
        'total_queries' => 500,
        'detected_threats' => 75,
        'detection_rate' => 15.0,
        'average_daily_queries' => 71.4
    ]
]
```

Advanced Features
-----------------

[](#advanced-features)

### Error Handling

[](#error-handling)

The library uses WordPress's `WP_Error` for consistent error handling:

```
$result = $client->check_ip( 'invalid-ip' );

if ( is_wp_error( $result ) ) {
    $code = $result->get_error_code();
    $message = $result->get_error_message();
    echo "Error ($code): $message";
}
```

### Caching

[](#caching)

The library implements intelligent caching to optimize performance:

```
// Configure caching
$client->set_cache_enabled( true );
$client->set_cache_expiration( 3600 );  // 1 hour
$client->set_cache_prefix( 'my_plugin_' );

// Force bypass cache for specific requests
$result = $client->export_detections( 100, 0, true );           // Bypass cache for raw data
$formatted = $client->get_formatted_detections( 100, 0, true ); // Bypass cache for formatted data

// Clear cache
$client->clear_cache();               // All cache
$client->clear_cache( '1.1.1.1' );    // Specific entry
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

Licensed under the GPLv2 or later license.

Support
-------

[](#support)

- [Documentation](https://proxycheck.io/api/)
- [Dashboard Access](https://proxycheck.io/dashboard/)
- [Issue Tracker](https://github.com/arraypress/proxycheck/issues)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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.

### Community

Maintainers

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

---

Top Contributors

[![arraypress](https://avatars.githubusercontent.com/u/22668877?v=4)](https://github.com/arraypress "arraypress (33 commits)")

### Embed Badge

![Health badge](/badges/arraypress-proxycheck/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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