[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Curl.php
<?php namespace BackupGuard; require_once(dirname(__FILE__).'/RequestHandler.php'); class Curl extends RequestHandler { private $handle = null; public function __construct($url) { parent::__construct($url); $this->handle = curl_init(); $this->set(CURLOPT_SSL_VERIFYPEER, false); $this->set(CURLOPT_SSL_VERIFYHOST, 0); $this->set(CURLOPT_SSLVERSION, 1); $this->set(CURLOPT_RETURNTRANSFER, true); $this->set(CURLOPT_CONNECTTIMEOUT, 10); $this->set(CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0'); $this->addHeader('Content-type: application/x-www-form-urlencoded'); } public function post() { $this->set(CURLOPT_POST, true); if (count($this->params)) { $this->set(CURLOPT_POSTFIELDS, http_build_query($this->params, '', '&')); } return $this->sendRequest('POST'); } public function get() { $this->set(CURLOPT_HTTPGET, true); return $this->sendRequest('GET'); } private function sendRequest($type) { $url = $this->url; //prepare url for get request if ($type == 'GET' && count($this->params)) { $url = rtrim($url, '/').'/'; if ($this->getWithQueryParams) { //standard get url, with query params $url .= '?'.http_build_query($this->params, '', '&'); } else { //mvs-styled get url $url .= implode('/', array_values($this->params)); } } $this->set(CURLOPT_URL, $url); if (!empty($this->headers)) { $this->set(CURLOPT_HTTPHEADER, $this->headers); } $body = curl_exec($this->handle); if ($body !== false) { $this->body = $body; $info = curl_getinfo($this->handle); $this->setResponseInfo($info); return $this->parseResponse(); } return false; } public function set($option, $value) { curl_setopt($this->handle, $option, $value); } public function __destruct() { if ($this->handle) { curl_close($this->handle); } } private function setResponseInfo($info) { if (isset($info['http_code'])) { $this->httpCode = $info['http_code']; } if (isset($info['content_type'])) { $this->contentType = $info['content_type']; } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium56.web-hosting.com
Server IP: 198.54.119.70
PHP Version: 8.2.30
Server Software: LiteSpeed
System: Linux premium56.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 70.77 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:
No
git:
Yes
User Info
Username: bkunreyz
User ID (UID): 830
Group ID (GID): 826
Script Owner UID: 830
Current Dir Owner: 830