gnawz Posted July 14, 2008 Share Posted July 14, 2008 Hi guys, I have to design a website with a messaging system and a chat in PHP. Please help as I have never done this. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/ Share on other sites More sharing options...
redbullmarky Posted July 14, 2008 Share Posted July 14, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-589355 Share on other sites More sharing options...
gnawz Posted July 18, 2008 Author Share Posted July 18, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-593145 Share on other sites More sharing options...
Daniel0 Posted July 18, 2008 Share Posted July 18, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-593233 Share on other sites More sharing options...
gnawz Posted July 18, 2008 Author Share Posted July 18, 2008 Hi The messaging system and chat should be private not public An individual selects an individual to chat with. It's like a members only section Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-593256 Share on other sites More sharing options...
xtopolis Posted July 19, 2008 Share Posted July 19, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-594006 Share on other sites More sharing options...
Daniel0 Posted July 19, 2008 Share Posted July 19, 2008 AJAX and PHP sockets. As a matter of fact, I'm writing a tutorial about it at the moment. Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-594039 Share on other sites More sharing options...
xtopolis Posted July 19, 2008 Share Posted July 19, 2008 AJAX and PHP sockets. As a matter of fact, I'm writing a tutorial about it at the moment. Excellent, can't wait for it! Quote Link to comment https://forums.phpfreaks.com/topic/114623-solved-help-on-interactive-website/#findComment-594061 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.