Il Sun, 04 Aug 2013 20:47:37 +0430, Farzan Dalaee ha scritto: Please use better quoting. > So best way is use a script(javascript) to send ajax to server every 5 > second to check users is logged in or not? Is that okey? It depends. > I want to write chat module like facebook and i need a solution to find > online users and way to send messages when users chat together, does any > one write similar module like that? Then knowing who is online is maybe the last of your problems. You have to find a way to send the message to "user B" when "user A" writes something. You absolutely need javascript. You just need to find out how to connect to the server. Have a look at socket.io, and find a php library that supports it. I think it is the easiets way. Be aware that the load on your server will be huge, growing exponentially with the number of online users. You can't escape it, except by using different technologies (XMPP as a protocol, with a javascript client, or using node.js with socket.io, for example) Bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php