This is probably an obvious answer but I can’t figure it out…
I’m reading this wikipedia entry, http://en.wikipedia.org/wiki/WebSocket#WebSocket_protocol_handshake and in the example it says the Base64 encoded string of 1d29ab734b0c9585240069a6e4e3e91b61da1969 is HSmrc0sMlYUkAGmm5OPpG2HaGWk=
Now using the PHP function base64_encode I get a different output. I also get a different result on some online base64 encoders! Where the hell is wikipedia getting this base64 value from?
1d29ab734b0c9585240069a6e4e3e91b61da1969is the hex string you need to base64 encode the sha1 binary value.http://ideone.com/K0d6y