Jump to content

API Query for c#


vinse123

Recommended Posts

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.

Link to comment

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#.

Link to comment
  • MTA Team
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 ;)

Link to comment

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...