[Tool/Web/Other] Api to retrieve server info
#1

Hi there,

Because of boredness I created a simple XML api to retrieve some info about your server (rules, info and player list). The api is located at http://sampapi.d4v1d.nl/ and takes 2 arguments: Format (currently only XML is supported, soon json will be) and IP:PORT, so, for example: http://sampapi.d4v1d.nl/xml/85.17.169.205:7787 would give the following output:

Код:
<server>
	<errors/>
	<info>
		<value name="password">
			<![CDATA[ 0 ]]>
		</value>
		<value name="players">
			<![CDATA[ 13 ]]>
		</value>
		<value name="maxplayers">
			<![CDATA[ 30 ]]>
		</value>
		<value name="hostname">
			<![CDATA[ [0.3e](`._.[Andromada Sumo]._.) ]]>
		</value>
		<value name="gamemode">
			<![CDATA[ [A]Sumo V2.5.4 ]]>
		</value>
		<value name="mapname">
			<![CDATA[ Find it ]]>
		</value>
	</info>
	
	<rules>
		<value name="gravity">
			<![CDATA[ 0.008 ]]>
		</value>
		<value name="mapname">
			<![CDATA[ Find it ]]>
		</value>
		<value name="version">
			<![CDATA[ 0.3e-R2 ]]>
		</value>
		<value name="weather">
			<![CDATA[ 10 ]]>
		</value>
		<value name="weburl">
			<![CDATA[ andromada.net ]]>
		</value>
		<value name="worldtime">
			<![CDATA[ 13:00 ]]>
		</value>
	</rules>
	
	<players>
		<value playerid="0" score="132" ping="26">d4v1d</value>
		<!-- More players.  -->
	</players>
</server>
If something goes wrong it always tries to give a nice and fancy error message. Current errors (that are catched and give a nice error message) are:
If you find any other errors or something's not working reply in this topic and let me know what you think (even if there are no errors )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)