1. Hey I was just wondering if anyone knew how i could add a server player count to my website?

    Here are my 3 limitations:
    1. My hosting is shared so i do not have access to sockets.
    2. No access to the RCON (could probably get it if there was no other way)
    3. It's a vanilla server

    Thanks! Any info would really help me out here!
     
  2. If you're running RustIO's Livemap you could create a script on your home computer and to grab the info from your livemap url [rust server IP:port/status.json] then FTP the desired HTML page up to your web server ( I use WinSCP ). Seems convoluted but would work. You could even create a list of servers to grab info from and then create a webpage to display the info.
     
  3. He said that it's a vanilla server, so working with Rust:IO won't work.

    If you aren't able to open any socket connections on your webserver, then I don't think there's a way to achieve your goal (RCON isn't able to push data and since it's a vanilla server plugins can't be used to push data either).

    Otherwise, I suggest using Server queries - Valve Developer Community, which afaik Rust Experimental (sort of) supports as well.
    This will allow you to grab server metadata quite easily, without connecting through RCON.
    There are numerous libraries that implement this protocol.
    One barebones library would be Source Server Query Library - Valve Developer Community, one for PHP would be GitHub - xPaw/PHP-Source-Query: PHP library to query servers that implement Source Engine Query protocol.
    Keep in mind that Rust sometimes doesn't entirely follow the specified protocols. If these libraries don't work, then you might have to do some experimentation, modify said libraries or write something simple yourself.
     
  4. A long work around that I thought of could be this.
    You create a simple database to store player count, the website access this database, and then you just make a program that hooks off of rusty or something and can send the data to the database, its a bad work around, but technically is due-able.
    The kiwi way :)
     
  5. is there any way that you can use Rust Server List | Rust Multiplayer Servers to do that? they offer banners that shows player count and many other thing. I think it might be easiest way to add live player count to website. There is one simple banner
    [​IMG] (sorry about advertisement, but just wanted to show what i mean)

    That site offers many other kind of banners that are live (that i posted is only picture of simplest banner)

    So if you think that that may help, just register server to rust-servers.net and that is it, you can find banners when you enter your servers site.

    p.s. not so good time to post banner (only 1 player inside :D)
     
  6. To update a database you'd either need a plugin or an RCON script on the server itself. This doesn't fulfill the proposed requirements either.
    Using an RCON script to build a database is even more effort than just pulling the right data via RCON or Source Server Query directly.
    It's a lot easier to just use RCON or Source Server Query, those are the most direct ways to achieving this.

    That'd work as an abstraction over Source Server Query.
     
  7. My Idea was purely a solution for if you cant edit server and you cant run script from website you could possibly use php from website to print the result on page load of website.
    The database would be updated via a program that requests that data (like how rusty gets it) or by hooking into another app that already does that.
    I didnt say it was the best infact at the very begining i said
    and I said that as a worst case method. :p
     
  8. If you are able to open remote database connections you can send Source Server Query commands as well. There is absolutely no difference and no reason for this kind of workaround, especially since PHP has one of the few Source Server Query libraries that seem to be fairly well supported.
    Even then, only obtaining the player number doesn't even require a library since it just requires you to send a few small packets á la specification.
     
  9. well that just shows how much i know (not much) but we kiwis will always find away (even if its not best) to get things going, cause we can improve it later
     
  10. Hmm not too sure if any of this will work. Thanks for all the info though everyone! Much appreciated.
     
  11. Good idea, i use this method with cURL :3

    I tried to use hooks , but could not find the server off hook . =(