111 return 1; |
111 return 1; |
112 } |
112 } |
113 |
113 |
114 |
114 |
115 |
115 |
|
116 /* |
|
117 * @param array $command to send to the server. |
|
118 * Return: 0 = Ok. |
|
119 * 1 = Server responden with an error. |
|
120 */ |
|
121 function send_array_check($command) |
|
122 { |
|
123 $answer = send_array($command); |
|
124 |
|
125 if (strlen($answer) && (($answer[0] == '1') || ($answer[0] == '2'))) |
|
126 return 0; |
|
127 |
|
128 return 1; |
|
129 } |
|
130 |
|
131 |
|
132 |
116 function startsWith($haystack, $needle) |
133 function startsWith($haystack, $needle) |
117 { |
134 { |
118 return !strncmp($haystack, $needle, strlen($needle)); |
135 return !strncmp($haystack, $needle, strlen($needle)); |
119 } |
136 } |
120 |
137 |