Setting this up for your own host

I've provided my own resources if you don't have a web host. So this page isn't neccessary if you don't have a host. But if you do have a web host, that's great!

You can use something like 000webhost, or whatever you please.

Once it's all set up, you only need to upload 2 PHP files and configure some modules!

PHP File 1:

Roblox Proxy, this file allows you to make Roblox requests from a game without them being blocked by Roblox themselves.

<?php
echo file_get_contents($_GET['url'])
?>

Example: yourhost.com/proxy.php?url=https://roblox.com

How does it work? This is a pretty simple method, "file_get_contents" makes a request to the URL you specify in the link, ?url= specifies the URL you want to get data from. Which in our case is Roblox-Based content.

PHP File 2:

Method for getting T-Shirt IDs, since they can't be inserted like shirts can be.

<?php
$assetId = $_GET['assetId'];
$data = file_get_contents("http://www.roblox.com/asset/?id=$assetId");
$xml = simplexml_load_string($data) or die("Error: Cannot create object: ".$_GET['assetId']);
$parsed = json_decode(json_encode($xml),true);
$data = ($parsed['Item']['Properties']['Content']['url']);
$data = explode('http://www.roblox.com/asset/?id=',$data)[1];
echo($data);
?>

Example: yourhost.com/getTemplate.php?assetId=969769182

How does it work? This is also a simple method, it requests XML from Roblox's API for your ID which is how all assets are loaded in-game. It then fetches the Shirt-Id from it.

Here's an example of what the XML looks like for https://www.roblox.com/catalog/969769182/Voltron-Shirt

<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
  <External>null</External>
  <External>nil</External>
  <Item class="Shirt" referent="RBX0">
    <Properties>
      <Content name="ShirtTemplate">
        <url>http://www.roblox.com/asset/?id=969769092</url>
      </Content>
      <string name="Name">Shirt</string>
      <bool name="archivable">true</bool>
    </Properties>
  </Item>
</roblox>

This can be saved as a "rbxmx" file and be dragged into Roblox studio.

Once done:

You can now configure the modules to work for your own web-host!

First, go to the model > Dependencies > HTTP > Utils , and go to the function "getTemplateId" and find the URL and replace it with yours, and make sure "?assetId=" is at the end.

Existing code:

local info = utils.get("https://jumpingstudios.xyz/robloxapi/getIdfromAsset.php?assetId="..assetId);

Once updated:

local info = utils.get("yourhost.com/getTemplate.php?assetId="..assetId);

Now setting up the proxy is even easier than that!

Go to the model > Dependencies > HTTP > Proxy and in the config table, update it with your host!

Existing code:

local config = {
	proxy = "https://jumpingstudios.xyz/robloxapi/proxy.php"; -- My own host, you can check out the setup tutorial if you want to use your own host.
}

Updated code:

local config = {
	proxy = "https://yourhost.com/proxy.php"; 
}

And you're all done with the setup on your own host!

Last updated

Was this helpful?