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

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

maopengwei/curl
===============

v2.0.0(2y ago)17MITPHP

Since Oct 13Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

关于
==

[](#关于)

PHP-Curl是一个轻量级的网络操作类，实现GET、POST、UPLOAD、DOWNLOAD常用操作，支持方法链写法

需求
==

[](#需求)

对低版本做了向下支持，但建议使用 PHP 5.3 +

安装
==

[](#安装)

```
composer require maopengwei/curl
```

```
use Maopengwei\Curl\Curl;
```

示例
==

[](#示例)

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

或者

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

##### GET:

[](#get)

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

##### POST:

[](#post)

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

##### UPLOAD:

[](#upload)

```
$curl->post(多维数组)->file($_FILE字段, 本地路径, 文件类型, 原始名称)->url(目标网址);
```

##### DOWNLOAD:

[](#download)

```
$curl->url(文件地址)->save(保存路径);
```

##### 配置

[](#配置)

参考:

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

##### 自动重试

[](#自动重试)

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

##### 结果

[](#结果)

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

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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 ~0 days

Total

2

Last Release

946d ago

Major Versions

v1.0.0 → v2.0.02023-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/03242be6ad7b114d3449ca91fb1a70a4ec701e20f961f0626db279ece356d25b?d=identicon)[maopengwei](/maintainers/maopengwei)

---

Top Contributors

[![mpw-explore](https://avatars.githubusercontent.com/u/29559370?v=4)](https://github.com/mpw-explore "mpw-explore (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/maopengwei-curl/health.svg)](https://phpackages.com/packages/maopengwei-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)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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