wersas1/cfscrape
Composer 安装命令:
composer require wersas1/cfscrape
包简介
A PHP module to bypass Cloudflare's anti-bot page.
关键字:
README 文档
README
A simple PHP module to bypass Cloudflare's anti-bot page (also known as "I'm Under Attack Mode", or IUAM)
Thanks https://github.com/Anorov/cloudflare-scrape
依赖
php >= 7.2
v8js扩展 https://github.com/phpv8/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
// 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
The MIT License (MIT). Please see License File for more information.
wersas1/cfscrape 适用场景与选型建议
wersas1/cfscrape 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 09 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cloudflare」 「ScoLib」 「cfscrape」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wersas1/cfscrape 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wersas1/cfscrape 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wersas1/cfscrape 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
a library for color manipulation and conversion in PHP
Symfony bundle for Cloudflare integration: trusted proxies, real client IP detection, forwarded headers.
根据银行卡号识别所属银行以及卡类型
Cloudflare Middleware For Guzzle
A laravel package for logging user actions into the database
Library for helping bypass the Cloudflare IUAM page
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-29