diff --git a/globals/config.php b/globals/config.php index 6de16a5..a0d9d51 100644 --- a/globals/config.php +++ b/globals/config.php @@ -35,6 +35,7 @@ try $clientUserAgent = "Roblox/WinInet"; $ROBLOXAssetAPI = "https://assetdelivery.roblox.com/v1/asset/?id="; $ROBLOXProductInfoAPI = "https://api.roblox.com/marketplace/productinfo?assetId="; + $ROBLOXAssetThumbnailAPI = "https://thumbnails.roblox.com/v1/assets?assetIds="; //default character hashes $defaultOutfitHash = "e335382cb0ef996df9053df58adcbe95"; //default render hash for characters diff --git a/globals/functions.php b/globals/functions.php index 43931d1..010fa27 100644 --- a/globals/functions.php +++ b/globals/functions.php @@ -3540,6 +3540,11 @@ function getUserGearsAccoutrements($userid) //ghetto 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) { $json = file_get_contents($GLOBALS['ROBLOXProductInfoAPI'].$assetid); diff --git a/html/Game/Tools/ThumbnailAsset.ashx b/html/Game/Tools/ThumbnailAsset.ashx index 34211fc..19e1212 100644 --- a/html/Game/Tools/ThumbnailAsset.ashx +++ b/html/Game/Tools/ThumbnailAsset.ashx @@ -71,6 +71,5 @@ if ($check->rowCount() > 0) //asset exists on Alphaland } else { - $json = json_decode(file_get_contents("https://thumbnails.roblox.com/v1/assets?assetIds=".$aid."&size=".$wd."x".$ht."&format=".$fmt."&isCircular=false")); - redirect($json->data[0]->imageUrl); + redirect(getRobloxAssetThumbnail($aid, $wd, $ht, $fmt)); } \ No newline at end of file