Jump to content

API Query for c#


vinse123

Recommended Posts

Posted

Hello! There was such question ... I create the program in the programming language C #, which must interrogate gaming MTA server and get the data server statistics. But nowhere manuals on the subject is not present, I ask for your help!

C # SDK is not suitable for the realization of this task, as it requires a login and password input.

  • MTA Team
Posted

The only option is to use the SDK or use various combination of languages to do what you want. I'm talking from experience as i was developing a software just for that.

 

Posted

You can access the MTA Web Interface from almost any programming language that can request web pages using HTTP POST and encode and decode JSON.

Now, I don't have much knowledge in C# therefore I can't write an example but I guess you can use cURL or sockets to fetch data from the server. Fetch it from http://<ip>:<http port> or use that IP and port to fetch via socket. You can check PHP or Java SDK on wiki and port it to C#.

  • MTA Team
Posted
On 28/10/2016 at 3:42 AM, GTX said:

You can access the MTA Web Interface from almost any programming language that can request web pages using HTTP POST and encode and decode JSON.

Now, I don't have much knowledge in C# therefore I can't write an example but I guess you can use cURL or sockets to fetch data from the server. Fetch it from http://<ip>:<http port> or use that IP and port to fetch via socket. You can check PHP or Java SDK on wiki and port it to C#.

You still need a user name and password or your server will be vulnerable ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...