4 Replies - 5256 Views - Last Post: 01 July 2010 - 03:45 PM Rate Topic: -----

#1 shadowslash  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-June 10

Serverless Private Chat?

Posted 01 July 2010 - 09:41 AM

Has anybody ever attempted at making a serverless DB-less private chat with PHP? I managed to sample CoffeeCup's Live Chat and that's exactly how I want it to be but the problem is, CoffeCup's program is really buggy and at times the messages wont show on either me or my user. If anyone has tried this or knows where to find a free one, please do tell.. :helpsmilie:

Is This A Good Question/Topic? 0
  • +

Replies To: Serverless Private Chat?

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Serverless Private Chat?

Posted 01 July 2010 - 09:51 AM

View Postshadowslash, on 01 July 2010 - 04:41 PM, said:

serverless DB-less private chat with PHP


unless you are using the command line—no.


PS. PHP usually runs on a server …

This post has been edited by Dormilich: 01 July 2010 - 09:52 AM

Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10777
  • View blog
  • Posts: 40,123
  • Joined: 27-December 08

Re: Serverless Private Chat?

Posted 01 July 2010 - 09:55 AM

PHP is designed to be a Server-Side language. At some point for the chat, you should be using a Server to manage traffic. This really isn't a good design. In addition, PHP is a dynamic language, not interactive, so you would have to refresh the page to see the updates in the chat. If you want more of a desktop application (or even an online application), something like Java may be a better tool, though you still should utilize a Server for this. In addition, Java can update in realtime.

You could, however, make a personal messenger (kind-of like email, only on a smaller scale) with PHP.
Was This Post Helpful? 0
  • +
  • -

#4 shadowslash  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-June 10

Re: Serverless Private Chat?

Posted 01 July 2010 - 10:08 AM

View Postmacosxnerd101, on 01 July 2010 - 08:55 AM, said:

PHP is designed to be a Server-Side language. At some point for the chat, you should be using a Server to manage traffic. This really isn't a good design. In addition, PHP is a dynamic language, not interactive, so you would have to refresh the page to see the updates in the chat. If you want more of a desktop application (or even an online application), something like Java may be a better tool, though you still should utilize a Server for this. In addition, Java can update in realtime.

You could, however, make a personal messenger (kind-of like email, only on a smaller scale) with PHP.

I'm aware that PHP runs on a server but what I was trying to say server-less was one where I don't need to have a program to handle the incoming messages be run 24/7. And yes, I kind of pictured it to be self-refreshing to check for new messages... I've seen some implementations on sites I've been to but I just can't remember which site it was. It was really fine atleast for the use I'm intending to put it into.

Here's how I picture the flow of things to be:

User A goes www.mywebsite.com/livesupport.
User A enters a name.
User A gets to chat with me.
User B comes also to www.mywebsite.com/livesupport.
User B also enters a name.
User B gets to chat with me.
User A and User B doesn't know of each other's existence which means I get to chat with both of them but they don't know I'm chatting with the other as well.

I hope my explanation was quite clear for understanding :helpsmilie:
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10777
  • View blog
  • Posts: 40,123
  • Joined: 27-December 08

Re: Serverless Private Chat?

Posted 01 July 2010 - 03:45 PM

This isn't that hard to do, so long as you set up your database and interactions with it correctly. In fact, there is a tutorial on a simple PM system, which is very close to what you want.

For the real-time element, you could try a Javascript solution. I *think* AJAX has something called polling which you may find helpful. However, I think Java Applets are much better designed for real-time chats.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1