bca/curl
Composer 安装命令:
composer require bca/curl
包简介
cURL wrapper for PHP applications.
README 文档
README
Work with remote servers via cURL much easier than using the native PHP bindings.
Requirements
- PHP 5.3+
- libcurl
Features
- POST/GET/PUT/DELETE requests over HTTP
- HTTP Authentication
- Follows redirects
- Returns error string
- Provides debug information
- Cookies
Install
Using Composer
Just add the following to the require section your composer.json file:
"bca/curl": "2.*"
Then execute composer install to pull down the latest release.
Package details can be found at https://packagist.org/packages/bca/curl.
Manually via Github
You may download a specific version from https://github.com/brodkinca/BCA-PHP-CURL/tags or visit the main repository at https://github.com/brodkinca/BCA-PHP-CURL/tree/master to download unreleased code or pull down a copy via git.
Versioning
This library will be maintained under the Semantic Versioning guidelines.
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bump the patch
Composer users who would like more granular control over upgrades should restrict their installation to patch updates only using this require key:
"bca/curl": "2.1.*"
For more information on SemVer, please visit http://semver.org/.
Examples
Simple requests can be constructed with just a URL and a method.
$request = new CURL('http://example.com/'); $response = $request->get();
More complex requests build upon that concept by adding methods to the request.
$request = new CURL('http://example.com/'); $response = $request ->param('aaa', 'bbb') ->param('xxx', 'yyy') ->post(); echo $response;
Advanced requests can be built by adding even more methods.
$request = new CURL('http://example.com/'); $response = $request ->param('aaa', 'bbb') ->param('xxx', 'yyy') ->option(CURLOPT_PROXY, '10.0.0.1') ->auth('username', 'password', 'digest') ->delete(); echo $response;
bca/curl 适用场景与选型建议
bca/curl 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 44.07k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2012 年 10 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「curl」 「wrapper」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bca/curl 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bca/curl 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bca/curl 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
cURL and cURL based Soap-Client for PHP
Simple cURL wrapper
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
A fluent PHP CURL wrapper
gv config package
统计信息
- 总下载量: 44.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 11
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-10-20