Nexuiz Server Monitor
Hello, i have coded a PHP Nexuiz Server Monitor. Nexuiz Server Monitor is a way for you as a server admin add some stats about your server to your webpage, that way your visitors can see what gametype, map etc. your server is running. Below is a very small explanation of the accepted parameters and some usage examples.
The url to the server monitor is http://static.doxer.se/other/nexuiz/stats.php where you can find the same examples as in this thread.
Parameters
- s [hostname/ip] (REQUIRED) - Hostname/ip the server listens to
- p [port] (OPTIONAL) - Port the server listens to. Defaults to 26000
- bg [R,G,B] (OPTIONAL) - Background color, RGB value separated by comma (","). Defaults to white
- fc [R,G,B] (OPTIONAL) - Font color, RGB value separated by comma (","). Defaults to 0,0,0 (black)
- namec [R,G,B] (OPTIONAL) - Color of the server name, RGB value separated by comma (","). If not specified main text color will be used
- hostc [R,G,B] (OPTIONAL) - Color of the hostname, RGB value separated by comma (","). If not specified main text color will be used
- playerc [R,G,B] (OPTIONAL) - Color of the player counter, RGB value separated by comma (","). If not specified main text color will be used
- mapc [R,G,B] (OPTIONAL) - Color of the map text, RGB value separated by comma (","). If not specified main text color will be used
- typec [R,G,B] (OPTIONAL) - Color of the gametype text, RGB value separated by comma (","). If not specified main text color will be used
- font [Font-id] (OPTIONAL) - Font of all text displayed. Defaults to 1 (Cantarell)
Examples
Default values
This example does only use one parameter, all the other configurables are set as default.
Custom background
This example shows how to use custom background. The background is set to 235-235-235 wich is a light grey color.
Custom background & font color
This example shows how to use custom font color. Font clor is set to 255-69-0 and the background is set to 169-169-169 wich is a dark grey color.
Custom server name color
In this example the name of the server is in dark violet (148-0-211) instead of black.
Custom font
Here we have a custom font selected from the list below (PT Sans Caption,7), use the font id as variable to the font parameter. All the fonts are free to use in both commercial & personal projects.
Aviable fonts
- 1 Cantarell (default)
- 2 Cantarell Bold
- 3 Cantarell Oblique
- 4 PT Sans
- 5 PT Sans Narrow
- 6 PT Sans Italic
- 7 PT Sans Caption
- 8 PT Sans Captio
- 9 Sansation Regular
- 10 Sansation Light
- 11 Sansation Bold
If you have some really good free fonts, please post them here
Any ideas, critic or similar is very welcome!
Edit: Updated version with capabilitie to change color for special sections & different fonts. I did also rewrite the whole code and i'm working on gettting an transparent background. I edited the whole doc section too, so i have edited the description in this thread aswell.
Edit2: Added the full source to SourceForge, svn also aviable thru SF. http://sourceforge.net/projects/nsm/

