Rune Central http://runequake.com/forums/ |
|
Server List Code http://runequake.com/forums/viewtopic.php?f=1&t=29 |
Page 1 of 1 |
Author: | IEEE 802.11 [ Wed Mar 19, 2003 9:09 pm ] |
Post subject: | Server List Code |
How do you get info like the level and player names on your server list page on the web site? I want to try this. http://www.runequake.com/servers/ |
Author: | Slot Zero [ Wed Mar 19, 2003 10:44 pm ] |
Post subject: | |
I use qstat to query the servers. You can find it here, http://www.qstat.org/ |
Author: | IEEE 802.11 [ Thu Mar 20, 2003 3:19 pm ] |
Post subject: | |
Could you go into great detail of how to do it exactly? I've read alot about it and have yet to figure out which gmake to use and how to install it. And that's only one part of it... can you offer more assistance? |
Author: | Slot Zero [ Thu Mar 20, 2003 4:32 pm ] |
Post subject: | |
If you're on a windows system, there is a precompiled binary for you. To compile the binary in Linux, use GNU make. [Typing 'make' in the qstat25c folder should work] For the servers page, I pipe the output of qstat to Perl. I use Perl to parse the output and generate the page. All of the Rune Quake pages are generated using Perl. For more information visit, http://www.perl.com http://www.perldoc.com You might want to do a search for some public scripts that might better illustrate how this is all done. I believe there are a couple mentioned in this thread, http://forums.runecentral.com/viewtopic.php?t=12 Hope this helps, |
Author: | Chuck [ Thu Mar 20, 2003 5:31 pm ] |
Post subject: | |
For your Postnuke site I suggest getting the "serverBrowser" module from http://www.thethird.net. It uses qstat and a perl wrapper. You will have to find someone to compile qstat for you, or you can try the one I already compiled for linux, linked in the thread mentioned in Slots last post (above). Read the docs (serverbrowser) carefully as there are instructions specific to your webhost. |
Author: | IEEE 802.11 [ Thu Mar 20, 2003 6:12 pm ] |
Post subject: | |
Ok I've got it to execute using Putty on the web site, and I've set the proper chmod on all the files, even the folder, I'm using some PHP3 code I found and it uses this line: exec("/var/www/html/unix/qstat quake.widomaker.com", $result); And so far it doesn't seem to work at all and I don't know how to tell if it's actually executing the program (and I did set it to the correct path because I actually pasted that line into Putty and it worked fine.) Any ideas? |
Author: | Chuck [ Thu Mar 20, 2003 9:40 pm ] |
Post subject: | |
try the boards at your webhost. did you read the directions pertaining to your host on the module i talked about? That might help |
Author: | IEEE 802.11 [ Thu Mar 20, 2003 10:05 pm ] |
Post subject: | |
Trying that now |
Author: | IEEE 802.11 [ Thu Mar 20, 2003 11:27 pm ] |
Post subject: | |
Nope, didn't work. Could you just tell me everything you did, Slot? Or maybe upload your compiled qstat? I'm using Chuck's, it seems to work, but who knows? And I still can't seem to find a way to compile jack. |
Author: | Slot Zero [ Fri Mar 21, 2003 12:08 am ] |
Post subject: | |
You can test the binary in a shell (PuTTY) by typing, ./qstat quake.shmack.net in the same directory that houses qstat. If you get a Permission Denied message, type chmod 755 qstat If you see results, qstat is working. If not, let me know and I'll e-mail the one I compiled. The next thing you have to do is find a language you feel comfortable working with (i.e. Java, Perl, PHP). In your PHP example, it looks as though the output is being forced to a scalar (string) instead of an array, this will only capture the last line of the output. While PHP is very similar to Perl, I'm not sure of the exact syntax of arrays in PHP. For PHP documentation check out, http://www.php.net/docs.php |
Author: | Chuck [ Mon Mar 24, 2003 1:18 pm ] |
Post subject: | |
I keep getting this error. Any help? Premature end of script headers: /home/virtual/site45/fst/var/www/cgi-bin/qstat.pl |
Author: | Slot Zero [ Mon Mar 24, 2003 5:13 pm ] |
Post subject: | |
It's useful to know what OS, web server, and what the actual script looks like, but some common things to check include; Making sure the script was uploaded properly in ASCII mode. Making sure the correct permissions are set. In some instances, this means dropping the write permission for group (try 744 or 700 instead of 755) Making sure the script has the correct path to Perl. |
Author: | Chuck [ Mon Mar 24, 2003 6:07 pm ] |
Post subject: | |
Thanks, I checked the path to perl already but will double-check the others now. |
Author: | Chuck [ Mon Mar 24, 2003 6:13 pm ] |
Post subject: | |
BINGO! I chmoded to 740 and it worked great. Thank you!! |
Author: | Chuck [ Tue Apr 01, 2003 8:59 pm ] |
Post subject: | |
Nice Hover effect on your server list! I like that. |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |