PHPackages                             wersas1/cfscrape - 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. wersas1/cfscrape

ActiveLibrary[Security](/categories/security)

wersas1/cfscrape
================

A PHP module to bypass Cloudflare's anti-bot page.

01PHP

Since Sep 29Pushed 3y agoCompare

[ Source](https://github.com/wersas1/cfscrape)[ Packagist](https://packagist.org/packages/wersas1/cfscrape)[ RSS](/packages/wersas1-cfscrape/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Cloudflare Scrape
=================

[](#cloudflare-scrape)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3dd7607b2bc760abbf8f6bb4ada3859d594b5441d5835ddc422bca3865b56a22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63667363726170652f63667363726170652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cfscrape/cfscrape)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/eb2051353f345c964f66998ee1a6ff078abfdbbb994cb6e9154538174b18e833/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63667363726170652f63667363726170652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/cfscrape/cfscrape)[![Total Downloads](https://camo.githubusercontent.com/909cfbe4a53a766f94a2fd0b511a099873877ede05cbd15844020384d7c7742f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63667363726170652f63667363726170652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cfscrape/cfscrape)

A simple PHP module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM)

Thanks

依赖
--

[](#依赖)

php &gt;= 7.2

v8js扩展

安装
--

[](#安装)

```
$ composer require cfscrape/cfscrape
```

使用
--

[](#使用)

### 获取响应

[](#获取响应)

```
$scraper = \Cfscrape\Cfscrape::createScraper();
// 延时
$scraper->setDelay(10);
// 自定义UA
$scraper->setUserAgent('custom-ua');
// \Psr\Http\Message\ResponseInterface
$response = $scraper->get('http://somesite.com');
```

### 获取Cookie

[](#获取cookie)

```
// cookies is array
// [
//     'cf_clearance' => 'c8f913c707b818b47aa328d81cab57c349b1eee5-1426733163-3600',
//     '__cfduid' => 'dd8ec03dfdbcb8c2ea63e920f1335c1001426733158'
// ]
[$cookies, $userAgent] = \Cfscrape\Cfscrape::getTokens('http://somesite.com');

// cookies is string
// cf_clearance=c8f913c707b818b47aa328d81cab57c349b1eee5-1426733163-3600; __cfduid=dd8ec03dfdbcb8c2ea63e920f1335c1001426733158
[$cookies, $userAgent] = \Cfscrape\Cfscrape::getCookieString('http://somesite.com');
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.7% 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/89b8bb261b729a76745927bf1e6efb4d994c4ca63e3bcf7f7611a57b2f0c7a12?d=identicon)[wersas1](/maintainers/wersas1)

---

Top Contributors

[![klgd](https://avatars.githubusercontent.com/u/8554422?v=4)](https://github.com/klgd "klgd (22 commits)")[![wersas1](https://avatars.githubusercontent.com/u/45006777?v=4)](https://github.com/wersas1 "wersas1 (1 commits)")

### Embed Badge

![Health badge](/badges/wersas1-cfscrape/health.svg)

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

###  Alternatives

[mews/purifier

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

2.0k18.7M142](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k36](/packages/paragonie-ecc)

PHPackages © 2026

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