Open factorin-j opened 7 years ago
$headers = array();
$lines = preg_split("/\r\n/", $receved_header);
foreach($lines as $line)
{
$line = chop($line);
if(preg_match('/\A(\S+): (.*)\z/', $line, $matches))
{
$headers[$matches[1]] = $matches[2];
}
}
$secKey = $headers['Sec-WebSocket-Key']; // This line giving error.
Please fix this
@factorin-j @varun-naharia theirs a server code update to use: stream_socket_server() see here> https://www.php.net/manual/en/function.stream-socket-server.php#125540 this fixes ssl/https but also since ive adapted my code i no longer get these errors
I'm unable to connect to the socket server if the client is changed to
wss
and accessed viahttps