PHPackages                             divinity76/cloudflare-ip-validator - 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. divinity76/cloudflare-ip-validator

ActiveLibrary

divinity76/cloudflare-ip-validator
==================================

Fast Cloudflare IP validator for PHP

v1.0.0(today)02↑2900%UnlicensePHPPHP &gt;=8.0

Since Mar 23Pushed todayCompare

[ Source](https://github.com/divinity76/cloudflare-ip-validator)[ Packagist](https://packagist.org/packages/divinity76/cloudflare-ip-validator)[ RSS](/packages/divinity76-cloudflare-ip-validator/feed)WikiDiscussions main Synced today

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

cloudflare-ip-validator
=======================

[](#cloudflare-ip-validator)

Fast PHP validation of whether an IP belongs to Cloudflare. This library is heavily optimized: [`src/CloudflareIpValidator.php`](src/CloudflareIpValidator.php), I believe the implementation is about as fast as userland PHP can get. To go faster, you would likely need a C-php-extension.

Install
-------

[](#install)

```
composer require divinity76/cloudflare-ip-validator
```

Public API
----------

[](#public-api)

- `Divinity76\CloudflareIpValidator\CloudflareIpValidator`
    - `isCloudflareIp(string $ip): bool` (static)

Usage
-----

[](#usage)

```
