{"id":575,"date":"2022-08-11T12:28:44","date_gmt":"2022-08-11T11:28:44","guid":{"rendered":"https:\/\/byteboxmedia.support\/?p=575"},"modified":"2022-08-12T14:33:54","modified_gmt":"2022-08-12T13:33:54","slug":"fivem-server-status-tutorial","status":"publish","type":"post","link":"https:\/\/byteboxmedia.support\/docs\/game-launcher-creator-v2\/fivem-server-status-tutorial\/","title":{"rendered":"FiveM Server Status Tutorial"},"content":{"rendered":"\n

You can now show the status of your FiveM server in your game launchers thanks to this PHP script devised by Danny, Villy, Stephen and XPreciousGaming (mostly XPG).<\/p>\n\n\n\n

This is a PHP file that you should create, configure then upload to a webserver (any web server that has PHP). Once you have created, edited and uploaded it you can then point to this PHP file using the QUERY STRING<\/a> object inside Game Launcher Creator to show a real-time Online\/Offline status of your FiveM server(s).<\/p>\n\n\n\n

Step 1 \u2013 Copy the PHP Code<\/strong>
Firstly, you need to copy the following PHP code to notepad on your computer\u2026<\/p>\n\n\n\n

Once you have copied, then pasted this into a new notepad file, we will need to modify some of it.<\/p>\n\n\n\n

If this code don\u2019t work download it here https:\/\/gamelaunchercreator.com\/forums\/work-in-progress-releases\/fivem-server-stats-php\/#post-131<\/p>\n\n\n\n

Step 2 \u2013 Server Modification<\/strong>
Now you need to modify some of the settings to match your server, to get the correct server information.<\/p>\n\n\n\n

The first line to edit is under [ SETTINGS ] and it is:<\/p>\n\n\n\n

$server_settings[\u2018ip\u2019] = \u201cyour IP here\u201d \u2013 where it says your IP here, replace this inside the speech marks, with your server IP (not port, just IP address)<\/p>\n\n\n\n

$server_settings[\u2018port\u2019] = \u201cyour port here\u201d \u2013 pop in your server port here, typically 30120<\/p>\n\n\n\n

Now this is complete, you can save this file. When the Save As dialog pops up, select All Files (.<\/em>) and type in yourfilename.php<\/p>\n\n\n\n

Once you have saved your file, upload it to your web server, it must support PHP (most do, Windows ones don\u2019t, by default).<\/p>\n\n\n\n

Once you have uploaded it, write down the URL, typically something like (https:\/\/mysite.com\/server-status.php)<\/p>\n\n\n\n

Step 3 \u2013 Integrating into your FiveM Game Launcher<\/strong>
Now open up Game Launcher Creator, insert a Query String, head over to the properties of that string and put in your URL for the post-url like so<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

FiveM Server Settings Query String<\/strong><\/p>\n\n\n\n

Insert the full URL in the POST url box, to test this, try inserting this URL into your web browser, it should display whether your server is online\/offline.<\/p>\n\n\n\n

For pre-POST text, you can write whatever you like. Typically you would write something like \u201cOur FiveM Server is\u201d and when it is online, it will display like:<\/p>\n\n\n\n

Our FiveM Server is Online<\/strong><\/p>\n\n\n\n

You can also change the font settings from this dialog too. You can move and position the query string in the live launcher editor for your game launcher.<\/p>\n\n\n\n

Please note, this script is now deprecated and you can find some new and updated FiveM PHP Scripts<\/a> here in the Store.<\/p>\n","protected":false},"excerpt":{"rendered":"

You can now show the status of your FiveM server in your game launchers thanks to this PHP script devised by Danny, Villy, Stephen and XPreciousGaming (mostly XPG). This is a PHP file that you should create, configure then upload to a webserver (any web server that has PHP). Once you have created, edited and […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-575","post","type-post","status-publish","format-standard","hentry","category-game-launcher-creator-v2"],"_links":{"self":[{"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/posts\/575"}],"collection":[{"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":1,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/posts\/575\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byteboxmedia.support\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}