Użycie funkcji http_build_query do tworzenia zapytań do botmastera w klasie BotAPIGG.
| | |
| | | |
| | | $tok = $this->httpQuery('https://'.$token['host'].'/setStatus/'.$auth['numer'], array( |
| | | CURLOPT_POST => TRUE, |
| | | CURLOPT_POSTFIELDS => array( |
| | | CURLOPT_POSTFIELDS => http_build_query(array( |
| | | 'status' => $status, |
| | | 'desc' => $desc, |
| | | ), |
| | | ), '', '&'), |
| | | )); |
| | | |
| | | if( (string)$tok->status != '0') { |
| | |
| | | |
| | | $tok = $this->httpQuery('https://'.$token['host'].'/botmaster/setUrl/'.$auth['numer'], array( |
| | | CURLOPT_POST => TRUE, |
| | | CURLOPT_POSTFIELDS => array('hash' => $hash), |
| | | CURLOPT_POSTFIELDS => http_build_query(array('hash' => $hash), '', '&'), |
| | | ), TRUE, FALSE); |
| | | |
| | | return $tok; |
| | |
| | | |
| | | $tok = $this->httpQuery('https://'.$token['host'].'/botmaster/setUrl/'.$auth['numer'], array( |
| | | CURLOPT_POST => TRUE, |
| | | CURLOPT_POSTFIELDS => array('hash' => $hash), |
| | | CURLOPT_POSTFIELDS => http_build_query(array('hash' => $hash), '', '&'), |
| | | ), TRUE, FALSE); |
| | | |
| | | if( (string)$tok->status != '0') { |