PHP code example of games647 / minecraft-banner-generator
1. Go to this page and download the library: Download games647/minecraft-banner-generator 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/ */
games647 / minecraft-banner-generator example snippets
//this is only used if you don't use composer
Banner.php';
use \MinecraftBanner\ServerBanner;
use \MinecraftBanner\MinecraftBanner;
[...]
//tell the browser that we will send the raw image without HTML
header('Content-type: image/png');
$banner = ServerBanner::server("example.minecraft.com", "§aHallo §cWelt");
imagepng($banner);