From 6621f5c56423a0d83770b93cad24f89ed03dc41d Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 31 Aug 2017 17:57:43 +0800 Subject: [PATCH] UpdateDatabase.php --- UpdateDatabase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UpdateDatabase.php b/UpdateDatabase.php index 62041848..c2f38b38 100644 --- a/UpdateDatabase.php +++ b/UpdateDatabase.php @@ -1145,14 +1145,18 @@ class Pman_Core_UpdateDatabase extends Pman $url = $url . "?" . $request; } - $ch = curl_init($url); if ($method == 'POST') { + curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); + + } else { + curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Content-Length: " . strlen($request))); + } curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); -- 2.39.2