Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Serverstatus-Icon incorporate into new page  (Read 2063 times)

0 Members and 1 Guest are viewing this topic.

Matze

  • Anope User
  • Offline Offline
  • Posts: 11
Serverstatus-Icon incorporate into new page
« on: December 12, 2013, 09:04:14 PM »

Hello,

there is a possibility, to get the Status from the Server on a other site?
I have build a serverlist on a other site and i want to take the status of the servers from the MagIRC-serverlist

Is there a walkthrough?

greetz,
matze
Logged

Hal9000

  • Team
  • *
  • Offline Offline
  • Posts: 103
Re: Serverstatus-Icon incorporate into new page
« Reply #1 on: December 14, 2013, 11:44:59 AM »

Hi Matze, yes you can.
You can use the REST service, for MagIRC 0.8.x it's rest/denora.php, for MagIRC 0.9.x it's rest/service.php
Unfortunately there is no comprehensive documentation yet, but the file itself provides some inline documentation with example calls.
So what you need is to use the /servers (to get all servers) or /server/<servername> (to get the specified server). A good way would be to make an AJAX call.
As a response you will get a JSON object which you can easily use in JavaScript or other means.
So for example you can do http://www.denorastats.org/magirc/rest/denora.php/servers
or http://www.denorastats.org/magirc/rest/denora.php/servers/colossus.teranova.net
Logged
Pages: [1]   Go Up