# FIRST exec this script to get the headers to put then in the php script ;) # # requirements: # pip install websocket-client import websocket if __name__ == "__main__": websocket.enableTrace(True) ws = websocket.create_connection("ws://127.0.0.1:8080") ws.send("message") result = ws.recv() print result ws.close()