logifurture wip
This commit is contained in:
1 parent
99b901009c
commit
a96abae35a
15 files changed
+2143
-1518
No files matched your search
@@ -8,7 +8,7 @@ class Curl
|
||||
{
|
||||
public static $testfiles = '/Console/Commands/TestFiles/';
|
||||
|
||||
public static function load($url)
|
||||
public static function load($url, $_config = [])
|
||||
{
|
||||
$debug = Nuh::$options['d'] ?? 0;
|
||||
$save = Nuh::$options['s'] ?? 0;
|
||||
@@ -30,6 +30,17 @@ class Curl
|
||||
return json_decode($file, true);
|
||||
}
|
||||
|
||||
// POST
|
||||
if (isset($_config['post'])) {
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($_config['post']));
|
||||
}
|
||||
|
||||
// JSON
|
||||
if (isset($_config['header'])) {
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $_config['header']);
|
||||
}
|
||||
|
||||
if ($proxy) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, Nuh::$options['proxy']);
|
||||
|
||||
Reference in new issue
Block a user