PHPackages                             aphexx/php-vpk-reader - 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. aphexx/php-vpk-reader

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

aphexx/php-vpk-reader
=====================

Library for reading VPK (Valve Pack File).

0101PHP

Since Feb 18Pushed 10y ago2 watchersCompare

[ Source](https://github.com/Aphexx/php-vpk-reader)[ Packagist](https://packagist.org/packages/aphexx/php-vpk-reader)[ RSS](/packages/aphexx-php-vpk-reader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP VPK Reader
==============

[](#php-vpk-reader)

VPK archive reader in PHP

### Reading file contents

[](#reading-file-contents)

```
$vpk_file = 'package_dir.vpk';
$vpk = new VPKReader\VPK($vpk_file);
$data = $vpk->read_file('/path/to/file.txt', 10000);
echo $data;
```

### Getting directory tree

[](#getting-directory-tree)

```
$vpk_file = 'package_dir.vpk';
$vpk = new VPKReader\VPK($vpk_file);
$ent_tree = $vpk->vpk_entries

$print_tree = function($node, $pwd='') use (&$print_tree){
        if(!is_null($node) && count($node) > 0) {
                if(is_array($node)){
                        echo '';
                        foreach($node as $name=>$subn) {
                                $fp = "$pwd/$name";
                                echo "$fp";
                                $print_tree($subn, $fp);
                                echo '';
                        }
                        echo '';
                }else{ // Node
                        echo " | size: $node->size bytes";
                }
        }
};
$print_tree($ent_tree);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/89cbcb8dc0a3c1e08cfdb244fe76a4d83da6c90e08d09e7616d5cdcba647a4e9?d=identicon)[Aphexx](/maintainers/Aphexx)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/aphexx-php-vpk-reader/health.svg)

```
[![Health](https://phpackages.com/badges/aphexx-php-vpk-reader/health.svg)](https://phpackages.com/packages/aphexx-php-vpk-reader)
```

###  Alternatives

[amin3520/anar

:description

272.3k](/packages/amin3520-anar)

PHPackages © 2026

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