diff --git a/04_Misc/05_PHP_Example/index.php b/04_Misc/05_PHP_Example/index.php
new file mode 100644
index 0000000..eb22f6c
--- /dev/null
+++ b/04_Misc/05_PHP_Example/index.php
@@ -0,0 +1,183 @@
+
+
+
+
+
+ connect_errno) {
+ printf("Connect failed: %s\n", $mysqli->connect_error);
+ exit();
+ }
+
+ // Some Examples
+ // List last 5 missions at the server
+ echo "
List last 5 missions at the server
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_DataMissionHashes` ORDER BY `pe_DataMissionHashes`.`pe_DataMissionHashes_datetime` DESC LIMIT 5")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_DataMissionHashes_id'] . " | ";
+ echo "" . $row['pe_DataMissionHashes_hash'] . " | ";
+ echo "" . $row['pe_DataMissionHashes_datetime'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+ // List last 5
+ echo "
List last 5 players known server
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_DataPlayers` ORDER BY `pe_DataPlayers`.`pe_DataPlayers_updated` DESC LIMIT 5")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_DataPlayers_id'] . " | ";
+ echo "" . $row['pe_DataPlayers_ucid'] . " | ";
+ echo "" . $row['pe_DataPlayers_lastname'] . " | ";
+ echo "" . $row['pe_DataPlayers_updated'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+ // List last 5 chat messages
+ echo "
List last 5 chat messages (note: INNER JOIN is used to pull the player's name from other table)
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_LogChat` INNER JOIN `pe_DataPlayers` on `pe_LogChat`.pe_LogChat_playerid = `pe_DataPlayers`.pe_DataPlayers_id ORDER BY `pe_LogChat`.`pe_LogChat_datetime` DESC LIMIT 5")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_LogChat_datetime'] . " | ";
+ echo "" . $row['pe_DataPlayers_lastname'] . " | ";
+ echo "" . $row['pe_LogChat_msg'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+
+ // List last 5 events
+ echo "
List last 5 events
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_LogEvent` ORDER BY `pe_LogEvent_datetime` DESC LIMIT 5")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_LogEvent_datetime'] . " | ";
+ echo "" . $row['pe_LogEvent_content'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+ // List last statistics
+ echo "
List last statistics (note: multiple INNER JOINs is used to pull information from other table)
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_LogStats` INNER JOIN `pe_DataMissionHashes` ON `pe_LogStats`.pe_LogStats_missionhash_id = `pe_DataMissionHashes`.pe_DataMissionHashes_id INNER JOIN `pe_DataPlayers` ON `pe_LogStats`.pe_LogStats_playerid = `pe_DataPlayers`.pe_DataPlayers_id INNER JOIN `pe_DataTypes` ON `pe_LogStats`.pe_LogStats_typeid = `pe_DataTypes`.pe_DataTypes_id ORDER BY pe_LogStats_datetime desc LIMIT 5")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_LogStats_datetime'] . " | ";
+ echo "" . $row['pe_DataPlayers_lastname'] . " | ";
+ echo "" . $row['pe_DataTypes_name'] . " | ";
+ echo "" . $row['ps_crashes'] . " | ";
+ echo "" . $row['ps_kills_planes'] . " | ";
+ echo "" . $row['ps_kills_armor'] . " | ";
+ // TIP: See documentation there is many more counted events which can be displayed here
+ echo "" . $row['pe_LogStats_mstatus'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+ // Get JSON objects with actual server information including LotATC and DCS SRS information
+ echo "
Get JSON objects with actual server information including LotATC and DCS SRS information
";
+ if ($result = $mysqli->query("SELECT * FROM `pe_DataRaw`")) {
+ echo "
";
+ while($row = mysqli_fetch_array($result))
+ {
+ echo "";
+ echo "| " . $row['pe_dataraw_updated'] . " | ";
+ echo "" . $row['pe_dataraw_payload'] . " | ";
+ echo "
";
+ }
+ echo "
";
+
+ $result->close();
+ }
+
+ // Close database connection
+ $mysqli->close();
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 512ca59..4badf69 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@



+[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ZBW8R5L25A8QW¤cy_code=EUR&source=url)

@@ -49,6 +50,7 @@ The following arguments are accepted (keep the order!):
* instance ID (shall be the same as in the lua file!)
* path to SRS client-list.json
* path to LotATC stats.json
+* numeric value (without quotes), set 1 for Autostart (Perun will start within 500ms after starting up)
Example for windows shortcut:
```
@@ -60,6 +62,8 @@ Data displaying and handling is not in the current scope of this project. Since

Due to resource limitations, "Perun for DCS World" will focus on pulling the data from DCS (and external modules) and pushing it to MySQL server, but if anyone would like to develop open sourced PHP applets for data/statistics displaying we're willing to cooperate and support such projects. Unfortunetly it's not possible to share the hardcoded code from forum.gildia.org.
+Basic example was provided [HERE](/04_Misc/05_PHP_Example/index.php) , support is available via Perun community at our [Discord](https://discord.gg/MTahREx).
+
## Troubleshooting - FAQ
- [I keep getting 1305 MySQL error](#i-keep-getting-1305-mysql-error)
- [Carrier landing are not tracked correctly](#carrier-landing-are-not-tracked-correctly)
@@ -84,6 +88,8 @@ DCS API does not track carrier or FARP operations natively, so there is a trick
* table: pe_LogLogins - holds login to server event history
* table: pe_LogStats - holds static information
+
+
## Data packets - send from lua to TCP port
* ```ID: 1```, contains version/diagnostic information
* perun version - for server administration usage
@@ -127,6 +133,10 @@ See also the list of [contributors](https://github.com/szporwolik/perun/contribu
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
+## Donation
+This software is provide "as it is" without any warranties, but if you would like to thank me for development/support please
+[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ZBW8R5L25A8QW¤cy_code=EUR&source=url)
+
## Acknowledgments
