Btw, this is what I have on my php:
<?php
ini_set("allow_url_fopen", 1);
$username = $_GET["u"];
$url = "https://osu.ppy.sh/api/get_user?u=" . $username . "&k=mysecretkey";
$json = file_get_contents($url);
$result = json_decode($json, true);
$accuracy = $result[0]["accuracy"];
$worldrank = $result[0]["pp_rank"];
$name = $result[0]["username"];
$pp = $result[0]["pp_raw"];
$acc = round($accuracy, 2);
$wrank = number_format($worldrank);
if ($pp > 0) {
print("Stats for " . $name . ": " . $pp . "pp, rank: #" . $wrank . ", acc: " . $acc . "%.");
}
else {
print("An error occured please check your inserted data.");
}
?>
Input would be: !stat "nick"
Output would be: Stats for "nick": xxx.xxpp, rank: #x,xxx, acc: xx.xx%.