- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUUID.php
More file actions
Latest commit
14 lines (14 loc) · 483 Bytes
/
Copy pathUUID.php
File metadata and controls
14 lines (14 loc) · 483 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
functiongetUUID($usr)
{
$ch = curl_init("https://api.mojang.com/profiles/minecraft");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "[\"".$usr."\"]");
$rlt = curl_exec($ch);
curl_close($ch);
$dcd = json_decode($rlt);
return$dcd[0]->id;
}
?>