[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Response.php
<?php namespace Unirest; class Response { public $code; public $raw_body; public $body; public $headers; /** * @param int $code response code of the cURL request * @param string $raw_body the raw body of the cURL response * @param string $headers raw header string from cURL response * @param array $json_args arguments to pass to json_decode function */ public function __construct($code, $raw_body, $headers, $json_args = array()) { $this->code = $code; $this->headers = $this->parseHeaders($headers); $this->raw_body = $raw_body; $this->body = $raw_body; // make sure raw_body is the first argument array_unshift($json_args, $raw_body); if (function_exists('json_decode')) { $json = call_user_func_array('json_decode', $json_args); if (json_last_error() === JSON_ERROR_NONE) { $this->body = $json; } } } /** * if PECL_HTTP is not available use a fall back function * * thanks to ricardovermeltfoort@gmail.com * http://php.net/manual/en/function.http-parse-headers.php#112986 * @param string $raw_headers raw headers * @return array */ private function parseHeaders($raw_headers) { if (function_exists('http_parse_headers')) { return http_parse_headers($raw_headers); } else { $key = ''; $headers = array(); foreach (explode("\n", $raw_headers) as $i => $h) { $h = explode(':', $h, 2); if (isset($h[1])) { if (!isset($headers[$h[0]])) { $headers[$h[0]] = trim($h[1]); } elseif (is_array($headers[$h[0]])) { $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); } else { $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); } $key = $h[0]; } else { if (substr($h[0], 0, 1) == "\t") { $headers[$key] .= "\r\n\t".trim($h[0]); } elseif (!$key) { $headers[0] = trim($h[0]); } } } return $headers; } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.67 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002