or
composer require tltneon/lgslInclude lgsl_class.php and query data from server using lgsl_query_live(protocol, ip, connect_port, query_port, software_port, flags) function, where:
protocol - server query protocol, ip - your server ip, connect_port - server connection port, query_port - server query port, software_port - server software port (mostly equal to 0), flags - "s" for main info, "e" for extra data and settings, "p" for players data.
Example of using LGSL:
:::php
There are two ways you can enter the Admin panel: (Note that you need to install LGSL first)
1. Just typing http://your_website/lgsl_folder/admin.php (For example: http://your_website/lgsl/admin.php)
2. Clicking on the top right corner of the page. Cheers, you just found a hidden link, ha-ha.
:::php
Possible parameters:
* Print as JSON: http://your_website/lgsl_files/lgsl_export.php?json=1
* Print as XML: http://your_website/lgsl_files/lgsl_export.php?xml=1
* Download as txt file: http://your_website/lgsl_files/lgsl_export.php?download=1
* Only online: http://your_website/lgsl_files/lgsl_export.php?online=1
* Only enabled: http://your_website/lgsl_files/lgsl_export.php?nodisabled=1
* Sorting by ip or type: http://your_website/lgsl_files/lgsl_export.php?sort=ip
For example, you can export enabled servers sorted by type as xml: http://your_website/lgsl/lgsl_files/lgsl_export.php?xml=1&nodisabled=1&sort=type
If you have more than 20 servers in your list, and you need the server information to be
more accurate as to current players and map information, then you can schedule updates.
Since LGSL updates when viewed, there has to be a limit on the update time otherwise the
page would take a long time to load while it polls all the servers.
By scheduling the webserver to 'view' LGSL at regular intervals, the server information
is cached ready for when a visitor views LGSL. Scheduling on webservers is known as a 'cron job'.
Setting up a cron differs between hosts, so you may need find out what method your host supports,
but here are examples of cron commands that I have used in the past.
curl --compressed -s -o /dev/null http://*your_website*/lgsl/lgsl_files/lgsl_cron.php
wget -q -O /dev/null http://*your_website*/lgsl/lgsl_files/lgsl_cron.php
php -q /public_html/lgsl/lgsl_files/lgsl_cron.php
Before setting up the cron, its recommended that you view the lgsl_cron.php in your browser to
make sure that there are no errors, and you can see how long it takes to update the servers.
First make sure the icons uploaded properly and that you can directly open them in your browser.
If LGSL is looking for them in the wrong place, manually set the path to /lgsl_files/ in
the LGSL_CONFIG.php remembering to include the trailing slash, for example:
$lgsl_config['url_path'] = "http://your_website/folder/gameservers/lgsl_files/";
Note that most of games builded on similar query protocols so they are grouped. Note that most of games builded on similar query protocols so they are grouped. To choose right game type, go to: https://github.com/tltneon/lgsl/wiki/Supported-Games,-Query-protocols,-Default-ports
Before you say that LGSL isn't works:
1. Make sure your web hosting has open ports and allow to sending requests to game servers.
1. Make sure you're entered right connection port and query port.
1. Make sure your server is working now and also server's ports is opened.
1. For some servers uses slightly different query port than connection port. Try to enter query port as "connection port + 1". For example: Connection port 27015, so you trying to enter Query port 27016. That often meets with Killing floor, Unturned and some other servers. Also check that page.
You can find styles at /lgsl_files/styles/ folder.
You can find languages at /lgsl_files/languages/ folder.
And a few lines at file install.php
Can't find your language? Contribute us your translation with your native language!
(You can use Google Translate if you need)
You need to know CSS3 and use Developer Tools (e.g. DevTools into Mozilla Firefox).
For example, we have any CS:GO server with map de_dust2. So to add map image we need to look at game type, game name and map name. CS:GO has gametype "source", game name "csgo" and map name "de_dust2". After we get that we can upload map image called de_dust2.jpg into /lgsl_files/maps/source/csgo/ folder. If it isn't exists - just create! That's all! If you correctly made it default map image will be replaced with yours new.
Watch in YouTube
Most common images you can download from here.
Mainly we need to help with finding bugs and to help to translate to any language.
Any your ideas (such as new style, game type, new feature) you can suggest to Issues page.
Also you can fork LGSL repository and give a star. Thanks!