From 83251275936fc890e44f45eeb2e9d9ac7cb1b4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 18 Nov 2020 11:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Client/Curl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/HttpServer/Client/Curl.php b/HttpServer/Client/Curl.php index 653c5cd6..1a5c9c16 100644 --- a/HttpServer/Client/Curl.php +++ b/HttpServer/Client/Curl.php @@ -63,7 +63,11 @@ class Curl extends ClientAbstracts [$host, $isHttps, $path] = $this->matchHost($path); $resource = $this->do(curl_init($host . $path), $host . $path, self::POST); - @curl_setopt($resource, CURLOPT_POSTFIELDS, $params); + curl_setopt($resource, CURLOPT_POST, 1); + curl_setopt($resource, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($resource, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($resource, CURLOPT_SSL_VERIFYHOST, false); + @curl_setopt($resource, CURLOPT_POSTFIELDS, $params); if ($isHttps !== false) { return $this->execute($this->curlHandlerSslSet($resource)); @@ -143,7 +147,6 @@ class Curl extends ClientAbstracts private function execute($curl) { $output = curl_exec($curl); - var_dump($output); if ($output === false) { return $this->fail(400, curl_error($curl)); }