GithubHelp home page GithubHelp logo

Somekind of API? about lgsl HOT 4 OPEN

MnkyArts avatar MnkyArts commented on June 11, 2024
Somekind of API?

from lgsl.

Comments (4)

tltneon avatar tltneon commented on June 11, 2024 2

Hey, I added little api to lgsl7 branch https://github.com/tltneon/lgsl/tree/lgsl7
To get data from api you need:

  1. Add to lgsl_config.php $lgsl_config['api'] = true;
  2. Open http://lgsl7.test/src/lgsl_feed.php
  3. Get what you need. e.g.
[{"name":"[Kgr.GD]-alte-Hasen !!! all Server Bans removed !!!","ip":"104.238.159.193","port":"7757","game":"redorchestra","map":"RO-Bondarevo-remastered-v3","players":0,"maxplayers":26,"online":true},{"name":"Pecypc-CEPBEP (Resource-SERVER)+3 perks","ip":"185.97.254.214","port":"7907","game":"killingfloor","map":"KF-Farm","players":0,"maxplayers":20,"online":true},{"name":"Punaportti","ip":"5.9.50.39","port":"34297","game":"rfactor","map":"Pello20212","players":0,"maxplayers":10,"online":true},{"name":"~[FGS]Wunderland~ ALTFIRE 2014","ip":"207.180.246.62","port":"7790","game":"deusex","map":"DXMP_Frequency","players":0,"maxplayers":20,"online":true},{"name":"","ip":"141.95.54.12","port":"7777","game":"ut3","map":"--","players":0,"maxplayers":0,"online":false},{"name":"[www.utbr.cf] The Brazilian UT3 Server","ip":"168.138.135.61","port":"7777","game":"ut3","map":"DM-ShangriLa","players":0,"maxplayers":10,"online":true}]

from lgsl.

MnkyArts avatar MnkyArts commented on June 11, 2024 1

This is perfect! Amazing how fast you implemented it, thank you!

from lgsl.

tltneon avatar tltneon commented on June 11, 2024

Hi @MnkyArts
LGSL now have an api-like feeding page that allow you to get one server's data. Example: https://www.fungameraltersheim.de/lgsl-master/lgsl_files/lgsl_feed.php?type=ts3&ip=213.239.213.230&c_port=9987&q_port=10011&request=s
Or you want to get all the servers in a row?

from lgsl.

MnkyArts avatar MnkyArts commented on June 11, 2024

Hey @tltneon,

yes i was talking about all servers in the system.

i played a bit with the system and build something like this:
{ "name": "A Minecraft Server", "ip": "127.0.0.1", "port": "25565", "game": "minecraft", "map": "world", "players": "0", "maxplayers": "20", "comment": "", "status": "1" }, { "name": "A Minecraft Server 2", "ip": "127.0.0.1", "port": "25566", "game": "minecraft", "map": "world", "players": "0", "maxplayers": "20", "comment": "", "status": "1" },

but would be cool to have this as a feature in the future :)

from lgsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.