RuHee: Get Loot data PHP by Chilkat new version code

Infestmmo.com
RaGEZONE VIP
Joined
Sep 2, 2025
Messages
64
Reaction score
80
If you’re using the latest Chilkat library, you should update your old code to match mine. It’s the best and fastest approach, and it will prevent any future issues with body data. I ran into problems after upgrading to the latest version, so I decided to rewrite the code to fix it completely.
And there are other issues as well — for example, the new version no longer supports CkByteData, so you’ll need to switch to CkBinData. I’ve tested it, and it’s much faster, but it requires changing a lot of code. So I’ll skip making a tutorial for now — I’m too lazy haha.
Unless it gets enough likes, haha.


images - RuHee: Get Loot data PHP by Chilkat new version code - RaGEZONE Forums


​
Screenshot 2025-10-12 193626 - RuHee: Get Loot data PHP by Chilkat new version code - RaGEZONE Forums



C++:
int CJobGetLootboxData::Exec()
{
    extern void GlobalCkUnlock();
    GlobalCkUnlock();

    CkRest rest;
    if (!rest.Connect(g_api_ip->GetString(), 80, false, true))
    {
        r3dOutToLog("!!! timeout getting lootbox db\n");
        return 0;
    }

    rest.AddHeader("Content-Type", "application/x-www-form-urlencoded");

    CkStringBuilder reqSb, outBody;
    reqSb.Append("serverkey=o5R1vnh2Wl1P");
    rest.FullRequestSb("POST", "/php/api_GetLootItmConfig.php", reqSb, outBody);

    pugi::xml_parse_result result = out_xmlFile.load_buffer(outBody.getAsString(), outBody.get_Length());
    if (!result)
    {
        r3dOutToLog("XML parse error: %s\n", result.description());
        return 0;
    }

    return 0;
}

OR

C++:
int CJobGetLootboxData::Exec()
{
    extern void GlobalCkUnlock();
    GlobalCkUnlock();

    CkRest rest;
    if (!rest.Connect(g_api_ip->GetString(), 80, false, true))
    {
        r3dOutToLog("!!! timeout getting lootbox db\n");
        return 0;
    }

    rest.AddHeader("Content-Type", "application/x-www-form-urlencoded");

    CkStringBuilder reqSb, outBody;
    reqSb.Append("serverkey=o5R1vnh2Wl1P");
    rest.FullRequestSb("POST", "/php/api_GetLootItmConfig.php", reqSb, outBody);

    out_xmlFile.load_string(outBody.getAsString());
    return 0;
}
 
Back