From fc9401f04a3aca5abb22f87ebc210de8afe11d32 Mon Sep 17 00:00:00 2001 From: marvin-borner@live.com Date: Tue, 10 Apr 2018 21:50:16 +0200 Subject: Initial Commit --- .../php/vendor/react/stream/examples/02-https.php | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 assets/php/vendor/react/stream/examples/02-https.php (limited to 'assets/php/vendor/react/stream/examples/02-https.php') diff --git a/assets/php/vendor/react/stream/examples/02-https.php b/assets/php/vendor/react/stream/examples/02-https.php new file mode 100644 index 0000000..163f7c8 --- /dev/null +++ b/assets/php/vendor/react/stream/examples/02-https.php @@ -0,0 +1,40 @@ +on('data', function ($chunk) { + echo $chunk; +}); +$stream->on('close', function () { + echo '[CLOSED]' . PHP_EOL; +}); + +$stream->write("GET / HTTP/1.0\r\nHost: $host\r\n\r\n"); + +$loop->run(); -- cgit v1.2.3