Community Forums Today's Posts     Member List     Archive    
Page 1 of 9 123 ... LastLast
Results 1 to 15 of 131
  1. #1
    Join Date
    Aug 2002
    Location
    Haydock
    Posts
    73

    Online Display Script

    Is there any way of creating a small script that works similar to ICQ, i.e when the page or script is activated it checks to see if the ts server is online if it is it displays a small online image (green light) if not then displays a red light, or something similar.



    Any help appreciated.

  2. #2
    Join Date
    Dec 2002
    Location
    ATL, GA
    Posts
    61

    Cool

    I'm sure this can be done with some php script, but what are you trying to use this on? a website I'm guessing? It would be fairly simple script, and I could get our scripter to write one, but right now I'm giving him the job of getting the info of who is online instead of it the server is online, or I might ask another site that I saw that on if I could borrow thiers...blah...blah...blah...

  3. #3
    Join Date
    Aug 2002
    Location
    Haydock
    Posts
    73
    I would like it really just for a standard php page really.

    Cheers
    Last edited by Bigman; 07-01-2003 at 12:37.

  4. #4
    Join Date
    Dec 2002
    Location
    ATL, GA
    Posts
    61

    Cool

    I'll see what we can do, but if anyone else wants to try to do this, go for it.

  5. #5
    Join Date
    Jan 2003
    Location
    Germany
    Posts
    4,140
    i have something for you. it's primitive, but works.
    you might need to change some values for your own server, but it should be a good start:

    PHP Code:
    :
    did you notice the biiiig fscanf call? i figured out the first number is the player id and the last string is the player name.
    if you figure out the meanings of the other values i'd be happy if you would share that information.
    Last edited by Brain; 19-07-2004 at 13:53.

  6. #6
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    24
    Nice work on the script. However, it times out for me. I'll keep playing around and see what's up with it.

    Last edited by Addict; 12-01-2003 at 17:12.

  7. #7
    Join Date
    Jan 2003
    Location
    Germany
    Posts
    4,140
    1.) the script uses default ports so make sure port 51234 tcp is accessible
    2.) the script assumes the teamspeak server is running on the same maching as the webserver. change "localhost" to your teamspeak server's address if necessary
    3.) i'm running apache 1.3.27 with php 4.3.0, tss2 and apache run on the same physical machine. the script works for me. see for yourself, i have integrated it into my clan's message board -> http://www.the-rip.de/wbboard

  8. #8
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    24
    Yeah i got the timeout fixed.

    It errors out on the first sendQuery. Almost like its not finding the right response. I'll keep digging though.

    I'm running it on the same server as TS & web. I'm running Win2k Server with IIS. PHP 4.3.0.
    Last edited by Addict; 13-01-2003 at 00:36.

  9. #9
    Join Date
    Jan 2003
    Location
    Germany
    Posts
    4,140
    PHP Code:
    if(getResults($socket) != "OK\n") { 
    i assume it is this line that causes the timeout. hmmm... windoze you say.... maybe it's another case of line break problems
    try OK\r\n instead of OK\n, maybe it helps

    or you can just telnet to localhost:51234 and test it yourself

  10. #10
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    24
    Originally posted by Brain
    PHP Code:
    if(getResults($socket) != "OK\n") { 
    i assume it is this line that causes the timeout. hmmm... windoze you say.... maybe it's another case of line break problems
    try OK\r\n instead of OK\n, maybe it helps

    or you can just telnet to localhost:51234 and test it yourself
    No it wasn't that line timing out. It was the initial connection. Got that fixed.

    I'll try the OK\r\n and see if that works. Thanks.

  11. #11
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    24
    Got it.

    For windows it does have to the \r

    Thanks....

  12. #12
    Join Date
    Aug 2002
    Location
    Oz
    Posts
    15
    I get this error on Linux with php 4.2.2

    Internal server error! Cause unknown.

    PHP Code:
    // select the one and only running server on port 8767
        
    sendQuery($socket"sel 8767");
        if(
    getResults($socket) != "OK\n") {
            echo(
    "Internal server error! Cause unknown.");
            exit;
        }
    // end if 
    Dont know why

  13. #13
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    24
    Originally posted by direwolf
    I get this error on Linux with php 4.2.2

    Dont know why
    Did you try adding the \r? Immediately after the OK.
    PHP Code:
     // select the one and only running server on port 8767
        
    sendQuery($socket"sel 8767");
        if(
    getResults($socket) != "OK\r\n") {
            echo(
    "Internal server error! Cause unknown.");
            exit;
        }
    // end if 
    That's just a generic error as this script has no error handling. Also you may want to switch to PHP 4.3.0.

  14. #14
    Join Date
    Jan 2003
    Location
    Germany
    Posts
    4,140
    php before 4.3.0 needs two parameters in the fgets function. -> http://www.php.net/manual/en/function.fgets.php

    i'm using php 4.3.0 on a linux webserver with linux tss2. ymmv.

  15. #15
    Join Date
    Aug 2002
    Location
    Haydock
    Posts
    73
    Can someone visit this page and see why im getting this error Cheers

    http://bigmanrlfans.dyndns.org/listing.php

    Im using IIS and PHP 4.3.0

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New Teamspeak Query script for php: Teamspeak Display
    By MrGuide@NL in forum [TeamSpeak 2] Addons & Scripts
    Replies: 347
    Last Post: 06-08-2010, 17:17
  2. User Online PHP Script
    By 1Aless1 in forum [TeamSpeak 2] Server Support
    Replies: 2
    Last Post: 11-03-2009, 13:20
  3. User online - offline script (php)
    By crazyandy in forum [TeamSpeak 2] Addons & Scripts
    Replies: 2
    Last Post: 19-03-2007, 17:17
  4. php script zum ts server online bestellen/aufschalten gesucht
    By noob1986 in forum [TeamSpeak 2] Server Support
    Replies: 6
    Last Post: 27-05-2006, 13:50
  5. Teamspeak 2 Status Display Script Released!
    By justinkwaugh in forum [TeamSpeak 2] Addons & Scripts
    Replies: 6
    Last Post: 09-02-2006, 09:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •