AvatarAPImg is a tiny PHP based API. It's your central avatar hub for selfhosted webapps. You can easily configure it with a json file.
Easily configure AvatarAPImg within the config.php
const URL = "https://avatar.yourdomain.tld/data/ego.json";Make your personal uuid with a sha1- or md5-hash
"API-Key": {
"uuid" : "5085867adc42fc7d09297f018244d28a"
}stdClass Object
(
[avatar] => stdClass Object
(
[user] => Rej
[src] => ./assets/ego.jpg
[format] => jpg
[width] => 250
[height] => 250
[title] => Rej
)
[API-Key] => stdClass Object
(
[uuid] => 5085867adc42fc7d09297f018244d28a
)
)$cUrl = curl_init();
curl_setopt_array($cUrl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://avatar.yourdomain.tld/api.php'
));
$avatar = curl_exec($cUrl);<?= $avatar; ?>Just copy the files to your server, using FTP. We recommend to use a subdomain for the API.
PHP 5.5+, Apache or Nginx
—
Demo: avatar.cctrl.de
^Rej
made with ❤ by shiftctrl