FCGI interface SAMPLE
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user