I will try to make my first post here as interesting as possible.
Recently, I was interested in the possibility of processing WebSocket requests on a shared hosting server.
Please do not tell me "update your plan." All of this would be trivial, at least in VPS. I understand that.
As you know, shared hosts will ...
- Kill the demon if he sees him.
- Block server socket usage
- Deny shell access
- Keep apache restrictions (without installing modules)
These restrictions completely exclude phpwebsocket, python. Requires a no-daemon solution that masquerades as a web page.
PHP is my favorite server language, I created a PHP web gateway, which is a web page.
So far, I have been able to send the correct headers for handshaking and streaming output (using output buffering), but I still cannot figure out how to continue reading data after the initial request.
In short, I want to keep getting data from the client even after running the PHP script. I tried reading the php: // pseudo-file, but I can no longer read it after the end of GET. Are there any settings or hacks that will allow this?
Thanks!
source share