PHPackages                             bjd/php-dom-crawl - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bjd/php-dom-crawl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bjd/php-dom-crawl
=================

Fetch Html Dom Texts based on Php Script.

v1.0.3(9y ago)130apache 2.0PHPPHP &gt;=5.4.0

Since Aug 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/baijingdong/PhpDomCrawl)[ Packagist](https://packagist.org/packages/bjd/php-dom-crawl)[ Docs](https://github.com/baijingdong/PhpDomCrawl)[ RSS](/packages/bjd-php-dom-crawl/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

PhpDomCrawl
===========

[](#phpdomcrawl)

---

\###Introduce The core htmldomparse code source using [https://sourceforge.net/p/simplehtmldom/code/HEAD/tree/trunk/simple\_html\_dom.php](https://sourceforge.net/p/simplehtmldom/code/HEAD/tree/trunk/simple_html_dom.php)

Now you can easily get this code through composer, It's requires PHP 5.4+ to run.

\###Install

checking packagist inorder to acquire the latest vesion.

add the following parameters:

`composer require bjd/php-dom-crawl`

\###How to Use

Acquire Content html text value just like use Javascript Dom parse

an exmple of crawl test ShadowSocks Account. using under yiiframe work

```
namespace frontend\controllers;

use yii;
use yii\web\Controller;
use Bjd\PhpDom\PhpCrawl;

class TestController extends Controller{
    public function actionIndex(){
        $res_data =  $this->_getContent();
        $file_put_path = Yii::getAlias("@app/runtime/logs/ss.tmp");

        file_put_contents($file_put_path,$res_data);
        yii::$app->response->sendFile($file_put_path,"gui-config.json");
        yii::$app->end();

    }

    public function actionStr(){
        echo $this->_getContent();
    }

    private function _getContent(){
        $html = PhpCrawl::file_get_html("http://ss.yuvpn.com/page/testss.html");
        $res  = $html->find(".testvpnitem") ;

        $ss_vpn = [];
        foreach($res as $key=>$value){

            $text =  $value->innertext();
            $ss_vpn[$key]['server'] = $value->find("span")[0]->innertext();

            $matches = [];
            preg_match_all("'¶Ë¿Ú£º\s?(.*?)'is",$text,$matches);
            $ss_vpn[$key]['server_port'] = $matches[1][0];
            preg_match_all("'ÃÜÂë£º\s?(.*?)'is",$text,$matches);
            $ss_vpn[$key]['password'] = $matches[1][0];
            $ss_vpn[$key]['method'] = $value->find("span")[1]->innertext();
            $ss_vpn[$key]['remarks'] = $value->find("span")[0]->innertext();

        }

        $data = [
            "index" => count($ss_vpn),
            "global" => true,
            "enabled" => true,
            "shareOverLan" => false,
            "isDefault" => false,
            "localPort" => 1080
        ];
        $data['configs'] = $ss_vpn;
        return   json_encode($data);
    }

}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

4

Last Release

3612d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phphtmldom

### Embed Badge

![Health badge](/badges/bjd-php-dom-crawl/health.svg)

```
[![Health](https://phpackages.com/badges/bjd-php-dom-crawl/health.svg)](https://phpackages.com/packages/bjd-php-dom-crawl)
```

###  Alternatives

[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3384.0M35](/packages/wa72-htmlpagedom)[artem_c/emmet

emmet implementation for php

141.8k](/packages/artem-c-emmet)

PHPackages © 2026

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