globals
This commit is contained in:
parent
dfb6cfd598
commit
24120b41b4
|
|
@ -35,6 +35,7 @@ try
|
||||||
$clientUserAgent = "Roblox/WinInet";
|
$clientUserAgent = "Roblox/WinInet";
|
||||||
$ROBLOXAssetAPI = "https://assetdelivery.roblox.com/v1/asset/?id=";
|
$ROBLOXAssetAPI = "https://assetdelivery.roblox.com/v1/asset/?id=";
|
||||||
$ROBLOXProductInfoAPI = "https://api.roblox.com/marketplace/productinfo?assetId=";
|
$ROBLOXProductInfoAPI = "https://api.roblox.com/marketplace/productinfo?assetId=";
|
||||||
|
$ROBLOXAssetThumbnailAPI = "https://thumbnails.roblox.com/v1/assets?assetIds=";
|
||||||
|
|
||||||
//default character hashes
|
//default character hashes
|
||||||
$defaultOutfitHash = "e335382cb0ef996df9053df58adcbe95"; //default render hash for characters
|
$defaultOutfitHash = "e335382cb0ef996df9053df58adcbe95"; //default render hash for characters
|
||||||
|
|
|
||||||
|
|
@ -3540,6 +3540,11 @@ function getUserGearsAccoutrements($userid) //ghetto
|
||||||
return $gears;
|
return $gears;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getRobloxAssetThumbnail($assetid, $width, $height, $fileformat)
|
||||||
|
{
|
||||||
|
return json_decode(file_get_contents($GLOBALS['ROBLOXAssetThumbnailAPI'].$assetid."&size=".$width."x".$height."&format=".$fileformat."&isCircular=false"))->data[0]->imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
function getRobloxProductInfo($assetid)
|
function getRobloxProductInfo($assetid)
|
||||||
{
|
{
|
||||||
$json = file_get_contents($GLOBALS['ROBLOXProductInfoAPI'].$assetid);
|
$json = file_get_contents($GLOBALS['ROBLOXProductInfoAPI'].$assetid);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,5 @@ if ($check->rowCount() > 0) //asset exists on Alphaland
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$json = json_decode(file_get_contents("https://thumbnails.roblox.com/v1/assets?assetIds=".$aid."&size=".$wd."x".$ht."&format=".$fmt."&isCircular=false"));
|
redirect(getRobloxAssetThumbnail($aid, $wd, $ht, $fmt));
|
||||||
redirect($json->data[0]->imageUrl);
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue