summaryrefslogtreecommitdiff
path: root/online/ingame/api/profile.picture.php
blob: 2dab6240102e1106269050210a9fbfc13bf1a51c (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php

if (!isset($_GET["kartik_online_token"])) {
    die();
} else if (ctype_xdigit($_GET["kartik_online_token"]) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/online/private/gametokens/" . $_GET['kartik_online_token'])) {
    $_DATA = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/online/private/gametokens/" . $_GET['kartik_online_token']), true);
} else {
    die();
}

echo("data:image/jpeg;base64," . base64_encode(file_get_contents($_DATA["avatar"]["url"])));