https://github.com/fragland/minestat_package
PHP/Packagist/composer package for Minestat
https://github.com/fragland/minestat_package
minecraft php
Last synced: 8 months ago
JSON representation
PHP/Packagist/composer package for Minestat
- Host: GitHub
- URL: https://github.com/fragland/minestat_package
- Owner: FragLand
- License: gpl-3.0
- Created: 2021-02-21T20:49:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T19:50:19.000Z (about 2 years ago)
- Last Synced: 2025-09-30T02:48:55.453Z (8 months ago)
- Topics: minecraft, php
- Language: PHP
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minestat_package
PHP/Packagist/composer package for [MineStat](https://github.com/FragLand/minestat)
### PHP example
**Note:** MineStat for PHP requires multi-byte string support to handle character encoding conversion. Enabling `mbstring` support can be as simple as installing the `php-mbstring` package for your platform. If building PHP from source, see https://www.php.net/manual/en/mbstring.installation.php. To validate, `phpinfo()` output will reference `mbstring` if the feature is enabled.
```php
", $ms->get_address(), $ms->get_port());
if($ms->is_online())
{
printf("Server is online running version %s with %s out of %s players.
", $ms->get_version(), $ms->get_current_players(), $ms->get_max_players());
if($ms->get_request_type() == "Bedrock/Pocket Edition")
printf("Game mode: %s
", $ms->get_mode());
printf("Message of the day: %s
", $ms->get_motd());
printf("Message of the day without formatting: %s
", $ms->get_stripped_motd());
printf("Latency: %sms
", $ms->get_latency());
printf("Connected using protocol: %s
", $ms->get_request_type());
}
else
{
printf("Server is offline!
");
}
?>
```