Page 1 of 1

Server API

PostPosted: 21 Nov 2011, 21:29
by Ultima
Is it possible to read the status of my server?
like serverlist.php

I am quiet good in php :mrgreen:

Re: Server API

PostPosted: 21 Nov 2011, 21:33
by g0d01w4r99
Yup. But unless you want to code it yourself, I dont think Dzienny will do it. But hey, hes full of surprises :P

Re: Server API

PostPosted: 08 Dec 2011, 11:06
by Ultima
g0d01w4r99 wrote:Yup. But unless you want to code it yourself, I dont think Dzienny will do it. But hey, hes full of surprises :P



Found something :)

Code: Select all
staticVars = string.Concat(new object[] {
                    mcdziennyMessage, "&pcount=", Player.players.Count, "&hash=", hash, "&uvisits=", Server.UniqueVisits, "&mode=", (int) Server.mode, "&port=", Server.port, "&max=", Server.players, "&name=", UrlEncode(Server.name), "&public=",
                    Server.pub
                 });
                uriString = "http://mcdzienny.cba.pl/heartbeat.php";
            Label_02D8:
                request = (HttpWebRequest) WebRequest.Create(new Uri(uriString));
                request.Method = "POST";
                request.ContentType = "application/x-www-form-urlencoded";
                request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
                byte[] bytes = Encoding.ASCII.GetBytes(staticVars);
                request.ContentLength = bytes.Length;
                request.Timeout = 0x84d0;


Now lets see if i can make a auto command of it..