<?php

require __DIR__ . '/LibreAuth.php';

$LibreAuthPublicKey = '';

$app = new LibreAuth(
    'MyApp',
    'YOUR_OWNER_ID',
    '1.0',
    'http://localhost/libreauth/api/1.3/'
);

$app->init();

$info = $app->login('user', 'pass', 'HWID-HERE');
if ($info) {
    echo "OK: {$info['username']}\n";
    foreach ($info['subscriptions'] as $s) {
        echo "  {$s['subscription']} -> {$s['expiry']}\n";
    }
}
