Download the PHP package sharkydog/http without Composer
On this page you can find all versions of the php package sharkydog/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package http
HTTP/Websocket server and client
A small HTTP server and client with websockets, intended for services in a local network, based on ReactPHP and a fork of ratchet/rfc6455.
:warning: Do NOT expose this to the Wild Wild Web!!!
It is NOT and probably never will be secure enough.
A simple DoS attack will bring it down, maybe the host machine too.
Some level of protection may be created through filters. A "contrack" filter is in "an idea" stage, to provide facility for other filters and handlers to track connections, set timeouts and such.
# Documentation is not yet written, there is a lot to write and will land in the Wiki eventually.
Until then, there is a quick start example for the server.
- new (13.10.24): server-handlers and promise
- new (16.10.24): streams
- new (17.10.24): filters
- new (18.10.24): access control
Similar examples will follow for websockets, clients and other features.
Examples should be looked in the main
branch, tagged releases may not have them up to date - main/examples.
And there is always the option to go for a treasure hunt through the source. And I will be happy to answer questions and provide assistance.
In short, some key features:
- HTTP/1.1, Keep-Alive, Chunked transfer encoding
- simple routes - error code, text response, callback, static files or custom handler
- Streams for request and response bodies
- Multipart stream and parser
- Byte range stream
- Promised response
- Connection, request, response filters
- Access control, based on routes, IPv4 address/cidr and basic authorization
- Websocket protocol handler (server)
- HTTP client
- Websocket client
Most of these however are not enabled by default and will need to be "used" in handlers. See examples.
All versions of http with dependencies
sharkydog/private-emitter Version ^1.0
sharkydog/ratchet-rfc6455 Version ^1.0
react/event-loop Version ^1.5
react/socket Version ^1.16
react/stream Version ^1.4