Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adoy/PHP-FastCGI-Client
Lightweight, single file, FastCGI client for PHP
https://github.com/adoy/PHP-FastCGI-Client
client fastcgi fcgi php
Last synced: 2 months ago
JSON representation
Lightweight, single file, FastCGI client for PHP
- Host: GitHub
- URL: https://github.com/adoy/PHP-FastCGI-Client
- Owner: adoy
- License: mit
- Created: 2010-09-28T16:42:43.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2019-12-11T15:41:12.000Z (about 5 years ago)
- Last Synced: 2024-10-20T06:51:53.602Z (3 months ago)
- Topics: client, fastcgi, fcgi, php
- Language: PHP
- Homepage:
- Size: 70.3 KB
- Stars: 302
- Watchers: 21
- Forks: 61
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- favorite-link - 此 PHP 类使用 FastCGI 协议处理与 FastCGI (FCGI) 应用程序的通信。
README
# PHP FastCGI Client
[![License](https://poser.pugx.org/adoy/fastcgi-client/license)](https://packagist.org/packages/adoy/fastcgi-client)
[![Latest Stable Version](https://poser.pugx.org/adoy/fastcgi-client/v/stable)](https://packagist.org/packages/adoy/fastcgi-client)
[![Total Downloads](https://poser.pugx.org/adoy/fastcgi-client/downloads)](https://packagist.org/packages/adoy/fastcgi-client)*PHP FastCGI Client* is a lightweight single file **FastCGI** client for PHP.
## How can I use it ?
```php
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:
```
./fcgiget.php localhost:9000/status
```Run a call through a Unix Domain Socket
```
./fcgiget.php unix:/var/run/php-fpm/web.sock/status
```> **Note:** This command line tool is provided for debuging purpose.
## Authors
* _**[Pierrick Charron](https://github.com/adoy)** ([email protected]) - Initial work_
* _**[Remi Collet](https://github.com/remicollet)**_## License
This project is licensed under the MIT License - for the full copyright and license information, please view the [LICENSE](LICENSE) file that was distributed with this source code.
---
_Copyrights 2010-2019 Pierrick Charron Inc. All rights reserved._