Pomoc - Szukaj - U¿ytkownicy - Kalendarz
Pe³na wersja: Problem z Teamspeakdisplay
Forum PHP.pl > Forum > PHP
sokql
Witam withstupidsmiley.gif , jestem zielony w tych tematach i mam do was prosbe, pniewaz potrzebuje na moja strone wtyczke do pdgladania co sie aktualnie dzieje na moim servie TS2 (program do komunikacji glosowej)

W pliku demo.php robie wszystko jak tam jest napisane ( wpisuje ip, port, qport servera ts2) po czym wysylam wszystk na strone i nie moze polaczyc sie z serverem bo pisze
Cytat
Demo: Server offline

Autorefresh: Off (Turn on)

Powered by Teamspeak Display


juz sam nie wiem co mam zrobic, pomozcie mi wkleje tu kod pliku demo.php i sprawdzczie czy jest tam cos zle albo co ja robie zle... blinksmiley.gif pomozcie mi prosze

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Teamspeak Display Demo</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <link href="demo.css" rel="stylesheet" type="text/css">
  7. <link href="teamspeakdisplay/teamspeakdisplay.css" rel="stylesheet" type="text/css">
  8. <?php
  9. if (isset($_GET['autorefresh'])) {
  10. $autorefresh = $_GET['autorefresh'];
  11. } else {
  12. $autorefresh = 0;
  13. }
  14. if ($autorefresh == 1) {
  15. echo(" <meta http-equiv="refresh" content="10; URL=" . $_SERVER["PHP_SELF"] . "?autorefresh=1">n");
  16. }
  17. ?>
  18. </head>
  19. <body>
  20. <h1>Demo:</h1>
  21. <?php
  22. // The code between the 2 lines below turns on PHPs error handlers.
  23. // Uncomment it for debugging purposes, but leave commented in live
  24. // environments. Having your script running in a live environment with the
  25. // error handlers turned on, decreases your sites security as a warning may
  26. // reveal information used to exploit security holes in your site.
  27. //================== BEGIN OF ERROR REPORTING CODE ====================
  28. //echo("<span style="color: #dd0000; font-weight: bold">Error reporting ");
  29. //echo("is currently on. Turn it off in live environments !</span><br><br>n");
  30. //error_reporting(E_ALL);
  31. //ini_set("display_errors", "1");
  32. //ini_set("display_startup_errors", "1");
  33. //ini_set("ignore_repeated_errors", "0");
  34. //ini_set("ignore_repeated_source", "0");
  35. //ini_set("report_memleaks", "1");
  36. //ini_set("track_errors", "1");
  37. //ini_set("html_errors", "1");
  38. //ini_set("warn_plus_overloading", "1");
  39. //================== END OF ERROR REPORTING CODE ======================
  40.  
  41. // Load the Teamspeak Display:
  42. require("teamspeakdisplay/teamspeakdisplay.php");
  43.  
  44. // Get the default settings
  45. $settings = $teamspeakDisplay->getDefaultSettings();
  46.  
  47. //================== BEGIN OF CONFIGURATION CODE ======================
  48.  
  49. // Set the teamspeak server IP or Hostname below (DO NOT INCLUDE THE
  50. // PORT NUMBER):
  51. $settings["serveraddress"] = "TU WPISYWALEM IP";
  52.  
  53. // If your you use another port than 8767 to connect to your teamspeak
  54. // server using a teamspeak client, then uncomment the line below and
  55. // set the correct teamspeak port:
  56. //$settings["serverudpport"] = TU WPISYWALEM PORT;
  57.  
  58. // If your teamspeak server uses another query port than 51234, then
  59. // uncomment the line below and set the teamspeak query port of your
  60. // server (look in the server.ini of your teamspeak server for this
  61. // portnumber):
  62. //$settings["serverqueryport"] = A TU QUERY PORT;
  63.  
  64. // If you want to limit the display to only one channel including it's
  65. // players and subchannels, uncomment the following line and set the
  66. // exact name of the channel. This feature is case-sensitive!
  67. //$settings["limitchannel"] = "";
  68.  
  69. // If your teamspeak server uses another set of forbidden nickname
  70. // characters than "()[]{}" (look in your server.ini for this setting),
  71. // then uncomment the following line and set the correct set of
  72. // forbidden nickname characters:
  73. //$settings["forbiddennicknamechars"] = "()[]{}";
  74.  
  75. //================== END OF CONFIGURATION CODE ========================
  76.  
  77. // Is the script improperly configured?
  78. if ($settings["serveraddress"] == "") { die("You need to configure this script as described inside the CONFIGURATION COD
    E block in "
     . $_SERVER["PHP_SELF"] . "<br>n"); }
  79.  
  80. // Display the Teamspeak server
  81. $teamspeakDisplay->displayTeamspeakEx($settings);
  82.  
  83. // Display autorefresh status and control link:
  84. echo("<br>n");
  85. if ($autorefresh == 0) {
  86. echo("Autorefresh: Off (<a href="" . $_SERVER["PHP_SELF"] . "?autorefresh=1">Turn on</a>)<br>n");
  87. } else if ($autorefresh == 1) {
  88. echo("Autorefresh: On (<a href="" . $_SERVER["PHP_SELF"] . "?autorefresh=0">Turn off</a>)<br>n");
  89. }
  90. ?>
  91. <br>
  92. Powered by <a class="nolink" target="_blank" href="http://tsdisplay.sourceforge.net">Teamspeak Display</a><br>
  93. </body>
  94. </html>


co mam zmienic? albo co jest nie tak
Puciek
Usun komentarze z lini port, query port.
Jezeli nadal nie dziala, sprawdz czy serwer ts dziala.

PS. W komentarzach masz napisane zeby odkomentowac linie z portem...
sokql
TS dziala napewno ( inny ts viewer i dziala TS2Viewer)
zrobilem to tak nie wiem czy dobrze moj angielski jest kiepski...

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Teamspeak Display Demo</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <link href="demo.css" rel="stylesheet" type="text/css">
  7. <link href="teamspeakdisplay/teamspeakdisplay.css" rel="stylesheet" type="text/css">
  8. <?php
  9. if (isset($_GET['autorefresh'])) {
  10. $autorefresh = $_GET['autorefresh'];
  11. } else {
  12. $autorefresh = 0;
  13. }
  14. if ($autorefresh == 1) {
  15. echo(" <meta http-equiv="refresh" content="10; URL=" . $_SERVER["PHP_SELF"] . "?autorefresh=1">n");
  16. }
  17. ?>
  18. </head>
  19. <body>
  20. <h1>Demo:</h1>
  21. <?php
  22. //================== BEGIN OF ERROR REPORTING CODE ====================
  23. //echo("<span style="color: #dd0000; font-weight: bold">Error reporting ");
  24. //echo("is currently on. Turn it off in live environments !</span><br><br>n");
  25. //error_reporting(E_ALL);
  26. //ini_set("display_errors", "1");
  27. //ini_set("display_startup_errors", "1");
  28. //ini_set("ignore_repeated_errors", "0");
  29. //ini_set("ignore_repeated_source", "0");
  30. //ini_set("report_memleaks", "1");
  31. //ini_set("track_errors", "1");
  32. //ini_set("html_errors", "1");
  33. //ini_set("warn_plus_overloading", "1");
  34. //================== END OF ERROR REPORTING CODE ======================
  35.  
  36. // Load the Teamspeak Display:
  37. require("teamspeakdisplay/teamspeakdisplay.php");
  38.  
  39. // Get the default settings
  40. $settings = $teamspeakDisplay->getDefaultSettings();
  41.  
  42. //================== BEGIN OF CONFIGURATION CODE ======================
  43.  
  44. $settings["serveraddress"] = "IP";
  45. $settings["serverudpport"] = PORT;
  46. $settings["serverqueryport"] = QPORT;
  47. $settings["limitchannel"] = "";
  48. $settings["forbiddennicknamechars"] = "()[]{}";
  49.  
  50. //================== END OF CONFIGURATION CODE ========================
  51.  
  52. // Is the script improperly configured?
  53. if ($settings["serveraddress"] == "") { die("You need to configure this script as described inside the CONFIGURATION COD
    E block in "
     . $_SERVER["PHP_SELF"] . "<br>n"); }
  54.  
  55. // Display the Teamspeak server
  56. $teamspeakDisplay->displayTeamspeakEx($settings);
  57.  
  58. // Display autorefresh status and control link:
  59. echo("<br>n");
  60. if ($autorefresh == 0) {
  61. echo("Autorefresh: Off (<a href="" . $_SERVER["PHP_SELF"] . "?autorefresh=1">Turn on</a>)<br>n");
  62. } else if ($autorefresh == 1) {
  63. echo("Autorefresh: On (<a href="" . $_SERVER["PHP_SELF"] . "?autorefresh=0">Turn off</a>)<br>n");
  64. }
  65. ?>
  66. <br>
  67. Powered by <a class="nolink" target="_blank" href="http://tsdisplay.sourceforge.net">Teamspeak Display</a><br>
  68. </body>
  69. </html>


czy tak to ma wygladac? bo jesli tak to dalej nie dziala
a i nie wiem co zrobic z tym...
  1. <?php
  2. // Is the script improperly configured?
  3. if ($settings["serveraddress"] == "") { die("You need to configure this script as described inside the CONFIGURATION COD
    E block in "
     . $_SERVER["PHP_SELF"] . "<br>n"); }
  4. ?>

co tutaj mam zmienic? jesli mozecie to napiszcie mi jak to ma wygladac bo jestem zielony -.-
To jest wersja lo-fi g³ównej zawarto¶ci. Aby zobaczyæ pe³n± wersjê z wiêksz± zawarto¶ci±, obrazkami i formatowaniem proszê kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.