forked from WyriHaximus/reactphp.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
130 lines (109 loc) · 5.1 KB
/
index.html
File metadata and controls
130 lines (109 loc) · 5.1 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>React</title>
<link rel="stylesheet" href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/main.css">%3C/div>
</head>
<body>
<div id="intro">
<img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/logo.png" alt="React" height="66">
<p>Event-driven, non-blocking I/O with PHP.
<br><br>
Version: <a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/react/releases/tag/v0.4.1">v0.4.1</a></p>%3C/div>
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/react" class="button" id="downloadbutton">GitHub</a>
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://twitter.com/reactphp" class="button">Twitter</a>
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://vimeo.com/channels/407317" class="button">Vimeo</a>
<div class="video-links">
TALKS:
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://www.youtube.com/watch?v=6E074UCJgvA" class="button">PHPNW12</a>
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://www.youtube.com/watch?v=MWNcItWuKpI" class="button">TakeOff</a>
<a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://www.youtube.com/watch?v=s6xrnYae1FU" class="button">Laracon</a>
</div>
</div>
<div id="quotes" class="clearfix">
<h2>React in the industry</h2>
<ul>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/jolicode/php-ar-drone">%3C/div>
<div><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/ar-drone.png" alt="AR-Drone" height="100"></div>
PHP-AR-Drone</a>
<br>Drone Remote Control</li>
</ul>
<br style="clear: both;">
<br>
<ul>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"http://socketo.me/">%3C/div>
<div><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/ratchet.png" alt="Ratchet" height="100"></div>
Ratchet</a>
<br>WebSocket Server</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/nrk/predis-async">%3C/div>
<div style="padding-top: 14px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/redis.png" alt="Redis" height="86"></div>
Predis/Async</a>
<br>Redis Client</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/bergie/dnode-php">%3C/div>
<div style="padding-top: 36px; padding-bottom: 25px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/dnode.png" alt="DNode" height="39"></div>
DNode-PHP</a>
<br>DNode Bindings</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/umpirsky/wisdom">%3C/div>
<div style="padding-top: 8px; padding-bottom: 0px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/wisdom.png" alt="Wisdom" height="92"></div>
Wisdom</a>
<br>Domain Checker</li>
</ul>
<br style="clear: both;">
<br>
<ul>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/zmq">%3C/div>
<div style="padding-top: 39px; padding-bottom: 30px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/zmq.png" alt="ZeroMQ" height="31"></div>
React/ZMQ</a>
<br>ZeroMQ Bindings</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/stomp">%3C/div>
<div style="padding-top: 23px; padding-bottom: 15px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/stomp.png" alt="STOMP" height="62"></div>
React/STOMP</a>
<br>STOMP Bindings</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/promise">%3C/div>
<div style="padding-top: 22px; padding-bottom: 6px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/promise.png" alt="Promise" height="72"></div>
React/Promise</a>
<br>Callback Heaven</li>
</ul>
<br style="clear: both;">
<br>
<ul>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/partial">%3C/div>
<div style="padding-top: 20px; padding-bottom: 5px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/partial.png" alt="Partial" height="75"></div>
React/Partial</a>
<br>Partial Application</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/whois">%3C/div>
<div style="padding-top: 15px; padding-bottom: 10px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/whois.png" alt="Whois" height="75"></div>
React/Whois</a>
<br>Whois Client</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/chatroulette">%3C/div>
<div style="padding-top: 20px; padding-bottom: 5px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/chatroulette.png" alt="Chatroulette" height="75"></div>
React/Chatroulette</a>
<br>Sample app</li>
<li><a href=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"https://github.com/reactphp/gifsocket">%3C/div>
<div style="padding-top: 10px;"><img src=/proxy/https/github.com/CodeZManoj/reactphp.github.io/blob/master/"./files/gifsocket.png" alt="Gifsocket" height="90"></div>
React/Gifsocket</a>
<br>Real Time Animated Gif</li>
</ul>
</div>
<div id="content" class="clearfix">
<h2>An example: Webserver</h2>
<p>This simple web server written in React responds with "Hello World" for every request.</p>
<pre>require 'vendor/autoload.php';
$app = function ($request, $response) {
$response->writeHead(200, array('Content-Type' => 'text/plain'));
$response->end("Hello World\n");
};
$loop = React\EventLoop\Factory::create();
$socket = new React\Socket\Server($loop);
$http = new React\Http\Server($socket, $loop);
$http->on('request', $app);
echo "Server running at http://127.0.0.1:1337\n";
$socket->listen(1337);
$loop->run();</pre>
<p>To install, just run this command:</p>
<pre class="sh_none">% composer init --require=react/http:0.3.* -n
% composer install</pre>
<p>To run the server, put the code into a file <code>example.php</code> and execute it with the <code>php</code> program:</p>
<pre class="sh_none">% php example.php
Server running at http://127.0.0.1:1337</pre>
</div>
</body></html>
You can’t perform that action at this time.