PHPackages                             zv/spider - 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. zv/spider

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

zv/spider
=========

PHP simple http client/spider class/简单的 PHP 的网络库

v1.1.1(5y ago)3124MITPHPPHP &gt;=7.0.0

Since Sep 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/djunny/spider)[ Packagist](https://packagist.org/packages/zv/spider)[ Docs](https://github.com/djunny/spider)[ RSS](/packages/zv-spider/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)DependenciesVersions (13)Used By (0)

spider
======

[](#spider)

PHP simple http client/spider class/简单的 PHP 的网络库

特色：

- 简单易用
- HTTP 抓取和匹配
- 自动识别 HTML/XML 等文档编码为 utf-8
- 支持多 IP 出口设置
- 支持各类代理

### Installation

[](#installation)

```
composer require zv/spider

```

### basic

[](#basic)

```

$spider = new \ZV\Spider('https://www.baidu.com/s?wd=爱情&pn=50&rn=50&tn=json', [
    //'User-Agent' => 'mobile',
]);

$spider->GET();
print_r($spider->getResponseCode());
print_r($spider->getResponseHeader());
print_r($spider->getBody());
print_r($spider->getUrl());
print_r($spider->getJson());

```

### POST

[](#post)

```

use \ZV\Spider as spider;

$spider = new spider('http://127.0.0.1/post', [
]);

$spider->POST([
    'query' => 1,
    // upload
    'file1' => '@' . __FILE__,
    // upload file with MIME
    'file2' => '@' . __FILE__ . ';text/plain'
]);

print_r($spider->getBody());

```

### string utils

[](#string-utils)

```

use \ZV\Spider as spider;

// html2txt (has newline)
echo spider::html2txt('html2txt'), PHP_EOL,

// no html(without newline)
spider::noHtml('noHtml'), PHP_EOL,

// strip_tags
spider::strip_tags('strip_tags'), PHP_EOL,

// cut str
spider::cut('cut', '', ''), PHP_EOL,

// match with mask
spider::maskMatch('maskMatch', '(*)'), PHP_EOL,

// match with regexp
spider::regMatch('regMatch', '#([^>]*?)#is'), PHP_EOL,

// match with multi pattern
print_r(spider::match('MatchByMultiPatternDescription', [
    'title' => '#([^>]*?)#is',
    'desc'  => '(*)'
]), 1), PHP_EOL;

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Recently: every ~30 days

Total

12

Last Release

1949d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1797883?v=4)[djunny](/maintainers/djunny)[@djunny](https://github.com/djunny)

---

Tags

phphttp clienthttp requestHttpGETHttpPOSTHttpPUTHttpDELETE

### Embed Badge

![Health badge](/badges/zv-spider/health.svg)

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

###  Alternatives

[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)[popphp/pop-http

Pop Http Component for Pop PHP Framework

1018.5k13](/packages/popphp-pop-http)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[simpod/clickhouse-client

PHP ClickHouse Client

19116.7k](/packages/simpod-clickhouse-client)

PHPackages © 2026

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