Jump to content

Recommended Posts

Please help as I have never done this.

 

what have you done before? what level are you at? what have you tried/looked at so far for this one?

please be a little more specific else you might not get the help/advice you're after and people might only end up going over ground that you've already covered.

Hi

 

I have done every thing else. The site can post news, offers and new items with a small CMS to allow for CRUD functions.

My problem is the messaging system and the chat.  Moreover I'm expected to do a chat like gmail's of facebook's.

 

So it the chat and private messaging system that I have a problem with.

Infact, the site should allow users to create their own pages-like one page of their profile and products.

For the chat thing you'd want to write a push server and clients that connect to it. When a client sends a message it should go to a server and the push server should then send the information to the recipient client. You could also do it the pull way, but that would result in far too much overhead if there are many clients connected at once seeing as they would have to poll the server at a regular interval in order to know if there are any knew messages for that particular client.

 

It kind of goes like this:

1) client1 and client2 connect

2) client1 sends a message to server which is meant for client2

3) server sends (pushes) client1's message to client2

 

The messages is as simple as just storing it in the database and assign user ids to it (recipient and sender user ids). Just make sure you cannot read messages that you haven't either sent yourself or are recipient of.

How can push be accomplished with PHP?  Sockets?

 

My current understanding of push is that the client still needs to be 'listening' for a new message all the time... but how would you accomplish that with PHP?  Or are you referring the OP to code something in java/flash/etc instead?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.