PHP - What Host name should we provide in websocket server file -


hello trying implemented chat application website. have uploaded files online server check chatting.the code works fine in localhost problem server.php don't run. running file through ssh terminal. think might have problem here

$server = new phpwebsocket(); $server->bind('message', 'wsonmessage'); $server->bind('open', 'wsonopen'); $server->bind('close', 'wsonclose'); // other computers connect, need change lan ip or external ip, // alternatively use: gethostbyaddr(gethostbyname($_server['server_name'])) $server->wsstartserver('127.0.0.1', 9300); 

my server.php file residing in directory

public_html/domain.com/websocket/server.php  


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -