Re: how to see all sessions sets in server
| From: | Alessandro Pellizzari | Date: | Mon, 05 Aug 2013 07:57:28 +0000 |
| Subject: | Re: how to see all sessions sets in server | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321802@lists.php.net to get a copy of this message | ||
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.