forked from adoy/PHP-FastCGI-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
58 lines (41 loc) · 1.25 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
_________________________
PHP FastCGI Client README
_________________________
AUTHOR & CONTACT
================
Charron Pierrick
DOCUMENTATION & DOWNLOAD
========================
Latest version is available on github at :
- http://github.com/adoy/PHP-FastCGI-Client/
Documentation can be found on :
- http://github.com/adoy/PHP-FastCGI-Client/
LICENSE
=======
This Code is released under the MIT license.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
How can I use it ?
==================
require 'vendor/autoload.php';
use Adoy\FastCGI\Client;
$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
);