<?php declare(strict_types=1);

require 'vendor/autoload.php';

use hollodotme\FastCGI\Client;
use hollodotme\FastCGI\Requests\PostRequest;
use hollodotme\FastCGI\SocketConnections\NetworkSocket;

$client     = new Client();
$connection = new NetworkSocket(
	'127.0.0.1',    # Hostname
	9999,           # Port
	50000,          # Connect timeout in milliseconds (default: 5000)
	50000           # Read/write timeout in milliseconds (default: 5000)
);	
$content    = http_build_query(['key' => 'value']);
$request    = new PostRequest('/opt/mainsite/wrenchboard/www/i.php', $content);

$response = $client->sendRequest($connection, $request);

echo $response->getBody();

