diff options
author | Alexander NeonXP Kiryukhin <frei@neonxp.info> | 2016-06-17 21:20:03 +0300 |
---|---|---|
committer | Alexander NeonXP Kiryukhin <frei@neonxp.info> | 2016-06-17 21:20:03 +0300 |
commit | 07af868f6700b7e0f564987e770f1579d8cff9fc (patch) | |
tree | 8c5732ae02f462cdecf90374e0f03dcbf15e9ca7 | |
parent | 16939f1a79f5242862f188ae0caca33c9e9f7b43 (diff) |
Debug
-rw-r--r-- | src/NeonXP/DozorApi.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/NeonXP/DozorApi.php b/src/NeonXP/DozorApi.php index c3b492e..8c7c510 100644 --- a/src/NeonXP/DozorApi.php +++ b/src/NeonXP/DozorApi.php @@ -45,17 +45,18 @@ class DozorApi "action" => 'entcod', ]; $data = http_build_query($params); - $context = [ + $contextData = [ 'http' => [ 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $data ] ]; - $context = stream_context_create($context); + $context = stream_context_create($contextData); $result = file_get_contents($this->getLink($chat), false, $context); + $contextData['result'] = $result; - return $this->parseResult($result); + return json_encode($contextData, JSON_UNESCAPED_UNICODE); } private function parseResult($html) @@ -109,4 +110,4 @@ class DozorApi { return $this->cache->fetch("link_{$chat->getId()}"); } -}
\ No newline at end of file +} |