• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Http Request In OTC

Discovery

Developing myself
Joined
Apr 16, 2010
Messages
561
Solutions
11
Reaction score
262
Location
Neverland
Hello guys!

Exist the possibility to send a http request logged by character name and receive a response?

Example:
Code:
http://request.com/?char=John+Doe

Like the script by stats.lua in client_stats but with logged character name.
 
@Erexo my real question is: how i can extract the character name logged? This part is so hard hahaha

And thanks for the link.
 
Last edited:
I've done this. It's easy but I had some problems with converting the page source code to string, it was too big and had some bugs.
You can look this module and learn to get data from http otclient/stats.lua at master · edubart/otclient · GitHub

It's not too hard to get character informations, but you need to know string manipulation to extract that from http.
 
@gugu15 yeh I used the stats! Very well, works fine! Thanks guys @Erexo

Another point: Exist a function that I can use that in OTClient like isset() in PHP? Example: - If (local) variable exist ?
 
I don't know nothing about php.
But if you wanna check if variable existis you can just do it: if (variable) then ..
 
Last edited:
I used the client_status.lua but no have any changes.

Ex: the report send to the server, OK.
But the POST value and GET not.

Is really confused, I tested the access to the ip, and works... but the POST value and GET dont come.
 
you need to know how to write a http get, you can find it searching with the google
 
Back
Top