Hi, I'm trying to implement a chat application in my website. I have uploaded to check the chat on my online server. This code works well in local hosts. The problem is that my server.php is not running. I am running through the file ssh from the terminal. I think I can have a problem here
$ server = new PHPWebSocket (); $ Server- & gt; Tie ('Message', 'wsOnMessage'); $ Server- & gt; Tie ('Open', 'WSOn Open'); $ Server- & gt; Tie ('Close', 'wsOnClose'); // To connect to other computers, you probably will need to convert it to your LAN IP or external IP, // Optionally: gethostbyaddr (gethostbyname ($ _ SERVER ['SERVER_NAME'])) $ Server- & Gt; WsStartServer ('127.0.0.1', 9300);
My server in this directory. Php file remains
public_html / domain.com / websocket / server.php
No comments:
Post a Comment