Server API

Server API

Postby Ultima » 21 Nov 2011, 21:29

Is it possible to read the status of my server?
like serverlist.php

I am quiet good in php :mrgreen:
User avatar
Ultima
 
Posts: 953
Joined: 19 Aug 2011, 23:45

Re: Server API

Postby g0d01w4r99 » 21 Nov 2011, 21:33

Yup. But unless you want to code it yourself, I dont think Dzienny will do it. But hey, hes full of surprises :P
Image
User avatar
g0d01w4r99
 
Posts: 453
Joined: 09 May 2011, 13:05
Location: Behind you.

Re: Server API

Postby Ultima » 08 Dec 2011, 11:06

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..
User avatar
Ultima
 
Posts: 953
Joined: 19 Aug 2011, 23:45


Return to Download & Changelog

Who is online

Users browsing this forum: No registered users and 5 guests

cron