I'm trying to use curl to make a persistent connection,much like websockets.. where once the connection is established the client and server just sends small text messages instead of a new http request each time..
For a websocket request, I am able to complete a handshake and recieve messages from the server (connection remains open). only issue is curl wont send anything with out the 'HTTP/1.1' header.
Everytime curl_exec is run, curl sends "GET / HTTP/1.1". Which is not needed once connection is established.
I can use curls custom request option to send my message but that would form a header like "message / HTTP/1.1".
It would be great if there was a way to eliminate that "HTTP/1.1" from the header.
I know php sockets are a better option but I'm just curious if there was a hacky way to make this happen(a websocket client maybe) using curl..
Any ideas ?