Is it only the server side vs. client side?
Can you have an instant message sent via PHP's fsockopen or am I limited due to polling with Javascript on the other side, the client?
Is it only the server side vs. client side?
Can you have an instant message sent via PHP's fsockopen or am I limited due to polling with Javascript on the other side, the client?
fsockopen creates the "normal" system sockets and thus can be used to connect to mail servers etc. WebSockets look similar at first but they are bidirectional data transfer encapsulated inside a HTTP(S) connection. This means, that you cannot use them to directly connect to mail servers etc. Instead you would need to have a WebSocket peer which forwards the data to plain sockets.