hitmany
Новичок
php скрипт
скачал скрипт мониторинга игры teeworlds (Скачать)
залил на хост,примера там не нашел,вот что в readme
--------------------------------------------------------------------------------------------------------------------------------------
(4) USAGE
1. Include a file TeeWorldsServer.php in your PHP script
2. Create a TeeWorldsServer object - first parameter is the server
address, second one is the server port and the third one is the timeout
in seconds.
If the default port is used (8303), second parameter can be omitted.
3. Call queryServer() method on the previously created object
4. If nothing went wrong, you can now access the server information with
the following methods:
getIp() -> returns server IP address
getPort() -> returns server port
getName() -> returns server name
getVersion() -> returns server version
getMap() -> returns map name
getGametype() -> returns gametype
getPing() -> returns server ping
getPlayers() -> returns player list as an array of TeeWorldsPlayer objects
Example (server address = localhost, port = 8305, timeout = 5 s):
include ('TeeWorldsServer.php');
$server = new TeeWorldServer('localhost', 8305, 5);
$server->queryServer();
echo $server->getName();
Two more examples (normal and console version) are located in the
directory examples/.
-------------------------------------------------------------------------------------------------------------------------------------
создал файл tee.php
выдаёт ошибку:
Parse error: syntax error, unexpected T_VARIABLE in /home/hitmany/domains/s1.d.hitmany.net/public_html/teew/tee.php on line 4
что мне делать? как писать скрипт?
скачал скрипт мониторинга игры teeworlds (Скачать)
залил на хост,примера там не нашел,вот что в readme
--------------------------------------------------------------------------------------------------------------------------------------
(4) USAGE
1. Include a file TeeWorldsServer.php in your PHP script
2. Create a TeeWorldsServer object - first parameter is the server
address, second one is the server port and the third one is the timeout
in seconds.
If the default port is used (8303), second parameter can be omitted.
3. Call queryServer() method on the previously created object
4. If nothing went wrong, you can now access the server information with
the following methods:
getIp() -> returns server IP address
getPort() -> returns server port
getName() -> returns server name
getVersion() -> returns server version
getMap() -> returns map name
getGametype() -> returns gametype
getPing() -> returns server ping
getPlayers() -> returns player list as an array of TeeWorldsPlayer objects
Example (server address = localhost, port = 8305, timeout = 5 s):
include ('TeeWorldsServer.php');
$server = new TeeWorldServer('localhost', 8305, 5);
$server->queryServer();
echo $server->getName();
Two more examples (normal and console version) are located in the
directory examples/.
-------------------------------------------------------------------------------------------------------------------------------------
создал файл tee.php
PHP:
<?php
include('TeeWorldsServer.php');
$server2 = LP("213.155.8.46",8303,5)
$server2->queryServer();
echo $server2->getName();
echo $server2->getVersion();
echo $server2->getMap();
?>
Parse error: syntax error, unexpected T_VARIABLE in /home/hitmany/domains/s1.d.hitmany.net/public_html/teew/tee.php on line 4
что мне делать? как писать скрипт?