TransWar File Browser

Path: C:\

<?php
	class RequestMinuta {
		function getResponse2($x,$de,$ate,$sts) {
			$url = "https://transwar.lannister.emitir.me/incomes/search?person_group_id=4&status=".$sts."&created_from=".urlencode($de." 00:00:00")."&created_to=".urlencode($ate." 23:59:59")."&page=".$x;  
			//echo $url.'<br>';
			$curl = curl_init($url);
			curl_setopt($curl, CURLOPT_URL, $url);
			curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
			$headers = array(
			   "accept: application/json",
			   "x-api-key: ".API_KEY,
			);
			curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
			curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
			curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
			curl_setopt($curl, CURLOPT_HEADER, 1);
			curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
			$resp = curl_exec($curl);
			curl_close($curl);
			$out = preg_split('/(\r?\n){2}/', $resp, 2);
			$headers = $out[0];
			$body[1] = $out[1];
			//echo '<pre>';
			//echo $headers.'<br>';
			$headersArray = preg_split('/\r?\n/', $headers);
			$headersArray = array_map(function($h) {
			  return preg_split('/:\s{1,}/', $h, 2);
			}, $headersArray);
			$tmp = [];
			foreach($headersArray as $h) {
		    $tmp[strtolower($h[0])] = isset($h[1]) ? $h[1] : $h[0];
			}
			$headersArray = $tmp; $tmp = null;
			//print_r($headersArray);
			$body[0]=$headersArray['x-ratelimit-remaining'];
		  return $body;
		}
	}
?>