NewPlay Game API — PHP example
==============================

Files
- client.php: small PHP 8+ client using built-in HTTP streams; no Composer packages required.

Create an API key
1. Sign in to NewPlay and open /konto/api.
2. Create a key and copy it. The full value is shown only once.
3. Store it as an environment variable on a trusted server. Never put it in browser JavaScript or a public repository.

Examples (Linux/macOS shell)
  export NEWPLAY_API_KEY='np_live_YOUR_KEY'
  php client.php list
  php client.php start A1B2C
  php client.php stop A1B2C

The start/stop response means the node accepted the task (HTTP 202). Read the list again after a moment to see the new state.
See https://newplay.pl/api-doc for the complete API documentation.
