HEX
Server: Apache
System: Linux main79 6.1.0-52-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.180-1 (2026-08-03) x86_64
User: serwer143450 (7544)
PHP: 7.4.33
Disabled: opcache_reset, opcache_invalidate, opcache_compile_file, opcache_get_configuration, opcache_get_status
Upload Files
File: /home/platne/serwer143450/public_html/tukultura.pl/wp-content/plugins/wp-reset/libs/pCloud/Curl.php
<?php

namespace pCloud;

use InvalidArgumentException;

class Curl {

	protected $curl;
	private $headers = array();

	function __construct($url = false) {
		if (!$url) {
			throw new InvalidArgumentException("Invalid URL");	
		}

		$this->curl = curl_init($url);
	}

	function __destruct() {
		curl_close($this->curl);
	}

	public function set($option, $value) {
		curl_setopt($this->curl, $option, $value);
	}

	public function addHeader($header) {
		$this->headers[] = $header;
	}

	public function exec() {
		$this->set(CURLOPT_HEADER, $this->headers);

		$r = curl_exec($this->curl);

		$httpCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
		$contentType = curl_getinfo($this->curl, CURLINFO_CONTENT_TYPE);

		$info = curl_getinfo($this->curl);

		$response = new Response($r, $httpCode, $contentType);

		return $response->get();
	}
}