Files
2022-10-23 09:29:33 +08:00

18 lines
501 B
PHP

<?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', 9999);
$content = http_build_query(['key' => 'value']);
$request = new PostRequest('/opt/mainsite/wrenchboard/www/script.php', $content);
$response = $client->sendRequest($connection, $request);
echo $response->getBody();