Skip to content

PHP Garry's Mod Addon Library (php-gmad) is a PHP library for handling and manipulation of Garry's Mod addon files (.gmad).

License

Notifications You must be signed in to change notification settings

everyday-as/php-gmad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Garry's Mod Addon Library

PHP Garry's Mod Addon Library (php-gmad) is a PHP library for handling and manipulation of Garry's Mod addon files (.gmad). These files provide a description of the addon and a filesystem of the addon, both can be managed using this library.

Latest Version Issues Open License

Requirements

  • PHP >=7.1 (64 bit)
  • mdurrant/php-binary-reader

Code Examples

$gma_data = fopen(__DIR__ . '/gmas/test.gma', 'rb');

$reader = new AddonReader($gma_data);
$reader->parse(); // throws

$addon = $reader->getAddon();

echo $addon . PHP_EOL;
echo count($addon->getFileIndex()) . ' file(s): ' . PHP_EOL;

foreach ($addon->getFileIndex() as $file) {
    echo "\t" . $file->getFileNumber() . '. ' . $file->getPath() . ' @ ' . $file->getOffset() . ' : ' . $file->getSize() . ' bytes' . PHP_EOL;
}

License

php-gmad is licensed under the MIT License.

Copyright 2018 Matt Stevens

About

PHP Garry's Mod Addon Library (php-gmad) is a PHP library for handling and manipulation of Garry's Mod addon files (.gmad).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages