Tento kód si uložte na svůj web a pak pouze stačí do adresy zadat uživatelské jméno (Příklad: http://www.epic.cz/skript.php?nick=zdenda204)
[PHP] UUID - offline mode nicky
[PHP] UUID - offline mode nicky
Spousta z Vás má jistě trable s tím, jak zjistit UUID pro hráče, který si hru nezakoupil.
Tento kód si uložte na svůj web a pak pouze stačí do adresy zadat uživatelské jméno (Příklad: http://www.epic.cz/skript.php?nick=zdenda204)
Tento kód si uložte na svůj web a pak pouze stačí do adresy zadat uživatelské jméno (Příklad: http://www.epic.cz/skript.php?nick=zdenda204)
- siOnzee
- Příspěvky: 810
- Věk: 27
- Registrován: 30 lis 2011, 21:40
- Reputation: 4
- Bydliště: siOnzee.cz
- Kontaktovat uživatele:
Re: [PHP] UUID - warez nicky
Dobře ty. Na tyhle blásty jsem nikdy neměl náladu, chce to moc přemýšlení a už jen vymyslet celej ten algoritmus je na hrozně dlouho.
MOJE PRÁCE KTERÉ JSEM ZDE ODVEDL
Pluginy:Články:
- Mysteria
- Příspěvky: 9122
- Registrován: 26 pro 2009, 15:40
- Reputation: 7
- Bydliště: Česká republika
- Kontaktovat uživatele:
Re: [PHP] UUID - warez nicky
To jsi psal ty sám?
Výběr z vlastních projektů: MinecraftServerList.cz ✔ Minecraft Extended Punishment List ✔ Killing Floor2 servery ✔
Spoiler: zobrazit
-
- Příspěvky: 3512
- Věk: 25
- Registrován: 18 úno 2012, 21:02
- Reputation: 11
Re: [PHP] UUID - warez nicky
Samozřejmě že to psal sám, máš ho snad za podvodníka?
[Pro všechny kromě zdendy](Nepsal, samozřejmě )[/Pro všechny kromě zdendy]
[Pro všechny kromě zdendy](Nepsal, samozřejmě )[/Pro všechny kromě zdendy]
- Mysteria
- Příspěvky: 9122
- Registrován: 26 pro 2009, 15:40
- Reputation: 7
- Bydliště: Česká republika
- Kontaktovat uživatele:
Re: [PHP] UUID - warez nicky
Myslel jsem si to, protože né že bych ho podceňoval, ale tyhle bitové operace a další věci nejsou zrovna nejlehčí věc na pochopení.
Výběr z vlastních projektů: MinecraftServerList.cz ✔ Minecraft Extended Punishment List ✔ Killing Floor2 servery ✔
Spoiler: zobrazit
Re: [PHP] UUID - warez nicky
co je uuid
-- 14 črc 2014, 11:54 --
pls co to je
-- 14 črc 2014, 11:54 --
pls co to je
- LpBahos
- Příspěvky: 934
- Věk: 24
- Registrován: 30 dub 2013, 15:52
- Reputation: 0
- Bydliště: Opava
- Kontaktovat uživatele:
Re: [PHP] UUID - warez nicky
Kód: Vybrat vše
<?php
/*
* Example of using the Classes.
*/
$profile = ProfileUtils::getProfile("Shadowwolf97");
$result = $profile->getProfileAsArray();
echo 'username: '.$result['username'].'<br>';
echo 'uuid: '.$result['uuid'].'<br/>';
//I am honestly not sure what the properties are at this point, but I included them just in case they are needed.
//echo 'properties: '.$result['properties'].'<br />';
$profile = ProfileUtils::getProfile("c465b1543c294dbfa7e3e0869504b8d8");
$result = $profile->getProfileAsArray();
echo 'username: '.$result['username'].'<br>';
echo 'uuid: '.$result['uuid'].'<br/>';
/*
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* OutPuts *
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* username: KingTiger
* uuid: 34346c234f8a4736b2cd79bd9c8d91b0
*/
class MinecraftProfile {
private $username;
private $uuid;
private $properties;
/**
* @param string $username The player's username.
* @param string $uuid The player's UUID.
* @param array $properties The player's properties specified on their Mojang profile.
*/
function __CONSTRUCT($username, $uuid, $properties = array()) {
$this->username = $username;
$this->uuid = $uuid;
$this->properties = $properties;
}
/**
* @return string The player's username.
*/
public function getUsername() {
return $this->username;
}
/**
* @return string The player's UUID.
*/
public function getUUID() {
return $this->uuid;
}
/**
* @return array The player's properties listed on their mojang profile.
*/
public function getProperties() {
return $this->properties;
}
/**
* @return array Returns an array with keys of 'properties, usernname and uuid'.
*/
public function getProfileAsArray() {
return array("username" => $this->username, "uuid" => $this->uuid, "properties" => $this->properties);
}
}
class ProfileUtils {
/**
* @param string $identifier Either the player's Username or UUID.
* @param int $timeout The length in seconds of the http request timeout.
* @return MinecraftProfile|null Returns null if fetching of profile failed. Else returns completed user profile.
*/
public static function getProfile($identifier, $timeout = 5) {
if(strlen($identifier) <= 16)
$identifier = ProfileUtils::getUUIDFromUsername($identifier, $timeout)['uuid'];
$url = "https://sessionserver.mojang.com/session/minecraft/profile/".$identifier;
$ctx = stream_context_create(array(
'http' => array(
'timeout' => $timeout
)
)
);
$ret = file_get_contents($url, 0, $ctx);
if(isset($ret) && $ret != null && $ret != false) {
$data = json_decode($ret, true);
return new MinecraftProfile($data['name'], $data['id'], $data['properties']);
}else {
return null;
}
}
/**
* @param int $timeout http timeout in seconds
* @param $username string Minecraft username.
* @return array (Key => Value) "username" => Minecraft username (properly capitalized) "uuid" => Minecraft UUID
*/
public static function getUUIDFromUsername($username, $timeout = 5) {
if(strlen($username) > 16)
return array("username" => "", "uuid" => "");
$url = 'https://api.mojang.com/profiles/page/1';
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => '{"name":"'.$username.'","agent":"minecraft"}',
'timeout' => $timeout
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
// Verification
if(isset($result) && $result != null && $result != false)
{
$ress = json_decode($result, true);
$ress = $ress["profiles"][0];
$res = Array("username" => $ress['name'], "uuid" => $ress['id']);
return $res;
}
else
return null;
}
/**
* @param $uuid string UUID to format
* @return string Properly formatted UUID (According to UUID v4 Standards xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx WHERE y = 8,9,A,or B and x = random digits.)
*/
public static function formatUUID($uuid) {
$uid = "";
$uid .= substr($uuid, 0, 8)."-";
$uid .= substr($uuid, 8, 4)."-";
$uid .= substr($uuid, 12, 4)."-";
$uid .= substr($uuid, 16, 4)."-";
$uid .= substr($uuid, 20);
return $uid;
}
}
Re: [PHP] UUID - warez nicky
Hotový nástroj: http://tools.glowingmines.eu
Přidejte se ke komunitě zákazníků na FakaHeda.eu Discord! Poznejte nové lidi nebo vyřešte svůj technický problém živě: http://discord.fakaheda.eu/
Re: [PHP] UUID - warez nicky
Bahosi, to je jen na online UUID, ne?
Mysty, samozřejmě že jsem to nepsal Toto jde naprosto mimo mě, netuším stále co to dělá Každopádně bych uvedl autora, jenže jaksi nevím kde jsem to tenkrát našel
Mysty, samozřejmě že jsem to nepsal Toto jde naprosto mimo mě, netuším stále co to dělá Každopádně bych uvedl autora, jenže jaksi nevím kde jsem to tenkrát našel
- Mysteria
- Příspěvky: 9122
- Registrován: 26 pro 2009, 15:40
- Reputation: 7
- Bydliště: Česká republika
- Kontaktovat uživatele:
Re: [PHP] UUID - offline mode nicky
To jeho je jenom pro newarez, to tvoje je i pro warez, takže lepší. Rozhodně se bude hodit. No, jak jsem říkal bitový operace no... taky bych ti neřekl co přesně to dělá každý kus.
Výběr z vlastních projektů: MinecraftServerList.cz ✔ Minecraft Extended Punishment List ✔ Killing Floor2 servery ✔
Spoiler: zobrazit
Kdo je online
Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 28 hostů