2017 © Pedro Peláez
 

library fastcgi-client

Client for communication with a FastCGI (FCGI) application using the FastCGI protocol.

image

adoy/fastcgi-client

Client for communication with a FastCGI (FCGI) application using the FastCGI protocol.

  • Thursday, October 20, 2016
  • by adoy
  • Repository
  • 18 Watchers
  • 177 Stars
  • 337,826 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 45 Forks
  • 9 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

PHP FastCGI Client

License Latest Stable Version Total Downloads, (*1)

PHP FastCGI Client is a lightweight single file FastCGI client for PHP., (*2)

How can I use it ?

<?php

require 'vendor/autoload.php';

use Adoy\FastCGI\Client;

// Existing socket, such as Lighttpd with mod_fastcgi:
$client = new Client('unix:///path/to/php/socket', -1);

// Fastcgi server, such as PHP-FPM:
$client = new Client('localhost', '9000');
$content = 'key=value';
echo $client->request(
    array(
        'GATEWAY_INTERFACE' => 'FastCGI/1.0',
        'REQUEST_METHOD' => 'POST',
        'SCRIPT_FILENAME' => 'test.php',
        'SERVER_SOFTWARE' => 'php/fcgiclient',
        'REMOTE_ADDR' => '127.0.0.1',
        'REMOTE_PORT' => '9985',
        'SERVER_ADDR' => '127.0.0.1',
        'SERVER_PORT' => '80',
        'SERVER_NAME' => 'mag-tured',
        'SERVER_PROTOCOL' => 'HTTP/1.1',
        'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
        'CONTENT_LENGTH' => strlen($content)
    ),
    $content
);

Command line tool

Run a call through a network socket:, (*3)

./fcgiget.php localhost:9000/status

Run a call through a Unix Domain Socket, (*4)

./fcgiget.php unix:/var/run/php-fpm/web.sock/status

Note: This command line tool is provided for debuging purpose., (*5)

Authors

License

This project is licensed under the MIT License - for the full copyright and license information, please view the LICENSE file that was distributed with this source code., (*6)


Copyrights 2010-2019 Pierrick Charron Inc. All rights reserved., (*7)

The Versions

20/10 2016

dev-master

9999999-dev

Client for communication with a FastCGI (FCGI) application using the FastCGI protocol.

  Sources   Download

MIT

by Pierrick Charron

fastcgi

20/05 2015

1.0.0

1.0.0.0

Client for communication with a FastCGI (FCGI) application using the FastCGI protocol.

  Sources   Download

MIT

by Pierrick Charron

fastcgi