array( 'method' => 'POST', 'protocol_version' => 1.1, 'timeout' => self::HTTP_TIMEOUT, 'max_redirects' => self::HTTP_MAX_REDIRECTS, 'header' => implode("\r\n", $headers), 'content' => json_encode($data) ) )); return @file_get_contents(trim($url), false, $context); } }