projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c09b7f
)
UpdateDatabase.php
author
edward
<edward@roojs.com>
Thu, 31 Aug 2017 09:57:43 +0000
(17:57 +0800)
committer
edward
<edward@roojs.com>
Thu, 31 Aug 2017 09:57:43 +0000
(17:57 +0800)
UpdateDatabase.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
6204184
..
c2f38b3
100644
(file)
--- 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);