PHPackages                             birjemin/curl - 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. birjemin/curl

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

birjemin/curl
=============

一个轻量级的PHP网络操作类，实现GET、POST、PUT、DELETE常用操作，出错自动重试，支持链式写法

0.0.4(7y ago)12.2k1MITPHPPHP &gt;=5.6

Since Aug 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Birjemin/curl)[ Packagist](https://packagist.org/packages/birjemin/curl)[ Docs](https://github.com/birjemin/curl)[ RSS](/packages/birjemin-curl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (1)

关于
==

[](#关于)

PHP-Curl是一个轻量级的网络操作类，实现GET、POST、PUT、DELETE常用操作，支持方法链写法。参考`https://github.com/wenpeng/curl`(✿✿ヽ(°▽°)ノ✿)，取消了file文件的上传和下载，增加了put,delete方法，传输协议取消`form-data`。

需求
==

[](#需求)

有时候仅仅是使用http请求get,post,put请求而已，使用`guzzlephp` composer包太重，所以参考了这个包做了一下简化。

依赖
==

[](#依赖)

PHP 5.6+

示例
==

[](#示例)

```
$curl = new Curl;
```

或者

```
$curl = Curl::init();
```

#### GET:

[](#get)

```
$curl->url(目标网址);
```

#### POST:

[](#post)

```
$curl->post(变量名, 变量值)->post(多维数组)->url(目标网址);
```

#### PUT:

[](#put)

```
$curl->put(变量名, 变量值)->put(多维数组)->url(目标网址);
```

#### DELETE:

[](#delete)

```
$curl->delete(变量名, 变量值)->delete(多维数组)->url(目标网址);
```

#### 配置

[](#配置)

参考:

```
$curl->set('CURLOPT_选项', 值)->post(多维数组)->url(目标网址);
```

#### 自动重试

[](#自动重试)

```
// 出错自动重试N次(默认0)
$curl->retry(3)->post(多维数组)->url(目标网址);
```

#### content-type协议

[](#content-type协议)

默认协议`Content-Type:application/x-www-form-urlencoded`, 可使用`Content-Type:application/json`

#### 结果

[](#结果)

```
// 任务结果状态
if ($curl->error()) {
    echo $curl->message();
} else {
    // 任务进程信息
    $info = $curl->info();

    // 任务结果内容
    $content = $curl->data();
}
```

#### 参考

[](#参考)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~31 days

Total

2

Last Release

2807d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31ba949e88f82dc5fe4c96dd3c96ff1bdd619f12775842e121efe004c02cf157?d=identicon)[Birjemin](/maintainers/Birjemin)

---

Top Contributors

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

---

Tags

php-curlcurl librarycurl postcurl lightweightcurl putcurl delete

### Embed Badge

![Health badge](/badges/birjemin-curl/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[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)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[codeception/module-phpbrowser

Codeception module for testing web application over HTTP

6529.8M508](/packages/codeception-module-phpbrowser)[athlon1600/php-curl-client

Simple PHP cURL Client

13112.2k3](/packages/athlon1600-php-curl-client)

PHPackages © 2026

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