1 | <?php |
||
29 | class Eco extends Http |
||
30 | { |
||
31 | /** |
||
32 | * Packets to send |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $packets = [ |
||
37 | self::PACKET_STATUS => "GET /frontpage HTTP/1.0\r\nAccept: */*\r\n\r\n", |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * Http protocol is SSL |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $transport = self::TRANSPORT_TCP; |
||
46 | |||
47 | /** |
||
48 | * The protocol being used |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $protocol = 'eco'; |
||
53 | |||
54 | /** |
||
55 | * String name of this protocol class |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | protected $name = 'eco'; |
||
60 | |||
61 | /** |
||
62 | * Longer string name of this protocol class |
||
63 | * |
||
64 | * @var string |
||
65 | */ |
||
66 | protected $name_long = "ECO Global Survival"; |
||
67 | |||
68 | /** |
||
69 | * query_port = client_port + 1 |
||
70 | * |
||
71 | * @type int |
||
72 | */ |
||
73 | protected $port_diff = 1; |
||
74 | |||
75 | /** |
||
76 | * Normalize some items |
||
77 | * |
||
78 | * @var array |
||
79 | */ |
||
80 | protected $normalize = [ |
||
81 | // General |
||
82 | 'general' => [ |
||
83 | // target => source |
||
84 | 'dedicated' => 'dedicated', |
||
85 | 'hostname' => 'description', |
||
86 | 'maxplayers' => 'totalplayers', |
||
87 | 'numplayers' => 'onlineplayers', |
||
88 | 'password' => 'haspassword', |
||
89 | ], |
||
90 | ]; |
||
91 | |||
92 | /** |
||
93 | * Process the response |
||
94 | * |
||
95 | * @return array |
||
96 | * @throws Exception |
||
97 | */ |
||
98 | 2 | public function processResponse() |
|
123 | } |
||
124 |