PHP code example of manialib / gbx

1. Go to this page and download the library: Download manialib/gbx library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

manialib / gbx example snippets


use Manialib\Gbx\Map;

$map = Map::loadFile('/path/to/my/map.map.gbx');

//save the map thumbnail
$map->getThumbnail()->saveJpg('/path/to/my/thumbnail.jpg');

//get map author
$author = $map->getAuthor();