StatLogger

A plugin designed to send statistics in JSON format to defined endpoints

Total Downloads: 346 - First Release: Mar 7, 2017 - Last Update: Mar 7, 2017

5/5, 6 likes
  1. Zanderwar submitted a new resource:

    StatLogger - A plugin designed to send statistics in JSON format to defined endpoints

    Read more about this resource...
     
  2. Nice! Didn't think about this. I can get rid of the json GET from RustIO for this information now ;)

    I added the PlayerName to the json for SendChat. Maybe a nice one to have on the next update

    I think i'll use this as a base for a site<>game chat plugin
     
  3. Yeah, I found the best possible practice is to only use the SteamID where possible and then query the SteamAPI for the personaname, avatar etc. Theres no point bloating your database with repeated PlayerName's when it should only be relying on a single record for the most current PlayerName

    Ideally you should have a model/table full of SteamID's (and then tie an individual player to the chat record as a relationship)

    Feel free to inbox me for some free advice (background: 15 years backend PHP development experience)

    Rule #1 as a developer: Don't Repeat Yourself (DRY Principal)

    --

    I'll look into adding an external configuration so that you don't have to modify the source code directly every single time an update drops
     
    Last edited by a moderator: Mar 8, 2017
  4. Is there no reference or tutorial on how to set this up ourselves, or are we required to hire you in order to actually have this work like the demo?
     
  5. This isn't a plug and play = wow what a great website plugin. You should either have the knowledge yourself on how to save the data that gets sent to your website, or hire someone else that does know how. The demo was purely to demonstrate what this data enables. Not to say "this is what you'll have when you're done"

    If you wanted a tutorial, I'd be writing for years.

    Regarding where the data is sent you merely open the source code and change the baseUrl and if you don't know what to do from there then this plugin isn't for you.

    Don't bite off more than you can chew.
     
  6. Well, I guess technically there isn't a guideline saying posting a plugin has to have an installation procedure on how to get it to work. Just thought I'd ask. Sorry to rise a snippy reply out of you. Wasn't my intention.
    It's alright, I'm sure I'll figure this out somehow. Just gotta do some research I guess.
     
  7. Well dude thats pretty good, but if you are building API like this you should have atleast some sort of authentication. So I think you should allow to add headers.
     
  8. i keep getting a error.
    any chance for a api example.

    (19:22:37) | [StatLogger] Sending Server Info

    (19:22:37) | [StatLogger] <HTML>

    <HEAD>

    <TITLE>404 Not Found</TITLE>

    <BASE href="/error_docs/"><!--[if lte IE 6]></BASE><![endif]-->

    </HEAD>

    <BODY>

    <H1>Not Found</H1>

    The requested document was not found on this server.

    <P>

    <HR>

    <ADDRESS>

    Web Server at royal-soldiers.com

    </ADDRESS>

    </BODY>

    </HTML>



    <!--

    - Unfortunately, Microsoft has added a clever new

    - "feature" to Internet Explorer. If the text of

    - an error's message is "too small", specifically

    - less than 512 bytes, Internet Explorer returns

    - its own error message. You can turn that off,

    - but it's pretty tricky to find switch called

    - "smart error messages". That means, of course,

    - that short error messages are censored by default.

    - IIS always returns error messages that are long

    - enough to make Internet Explorer happy. The

    - workaround is pretty simple: pad the error

    - message with a big comment like this to push it

    - over the five hundred and twelve bytes minimum.

    - Of course, that's exactly what you're reading

    - right now.

    -->
     
  9. Seems like you used a URL to royal-soldiers.com which does not exist. What is the URL you used?
     
  10. hi..

    i have all the time this Error?

    [StatLogger] Error getting response stream (ReadDone1): ReceiveFailure

    [StatLogger] Error getting response stream (ReadDone1): ReceiveFailure
     
  11. It would be nice to have the plugin start when the server has started.. It's spitting out errors after the startup cause it couldn't send anything
     
  12. Nice, but useless if you don't know anything of scripting. I don't have a clue to get this working on my website.
     
  13. How Do You Even Configure It Theres Not Even A Config File
     
  14. bREeeEeEeeEeeEZaaaHhH

    It doesn't really need a config file as everything will be pushed to an external URL (you have to edit the .cs file). As an example:
    Code:
    $json = file_get_contents("php://input");
    $data = json_decode($json, true);
    $SteamID = $data['SteamID'];
    $PlayerName = $data['PlayerName'];
    $Address = $data['Address'];
    With this little PHP code you can do "something" with the people that join. Save their ID, playername and IP address for later use (stats, join counts, unique players, etc)

    Basically if you don't know how this works, you wouldn't (or shouldn't) use it.
     
  15. I Want To Use This Plugin But Theres Not Really Anything To Tell How To Set It Up