FCGI interface SAMPLE

This commit is contained in:
2022-10-23 09:29:33 +08:00
parent 97e33ebadb
commit b59cc6dbfa
4 changed files with 518 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?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();