Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7924317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:42:13+00:00 2026-06-03T17:42:13+00:00

I want to send a response to all users which are currently active (Logged

  • 0

I want to send a response to all users which are currently active (Logged or viewing content) when the database data changes.

Example

Some user is viewing “data” table.

Currently I’m executing AJAX calls every 5 seconds and if there is change in data database response the client will be notified.

However I no longer want to do it this way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:42:14+00:00Added an answer on June 3, 2026 at 5:42 pm

    The alternative for ajax polling (as you did) is using comet/server-side push.

    In other words, you would use something like WebSockets, Ajax long-polling, Server-Sent Events, etc., to send messages to the client instead of the client polling.

    For the sake of this example, I’m going to use WebSockets. What I describe below applies to the other methods as well, though.

    If you already have an existing PHP application, the simplest way to do this would probably be to write a separate “daemon” script which handles the sockets. Whenever your application changes some data in the DB, you would send a message to the daemon script, which would then notify the connected clients of the change.

    You could use something like ZeroMQ for messaging between the main app and the socket daemon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of person objects which I want to send in response
I have this form. Basically what I want is to send a auto-response with
Hello Sir i want send list of data to php server i use following
Want to send the text from my current vb application to the Active Window
I want to send ViewData.model to Special action with the last user data entry.
Can you include JSON-like data in a response using connect/express? When users hit '/'
I'm attempting to send an HTTP POST to a Rails 3 Application. Currently all
In Java, if I want to send data to form on the server, where
I want send a email by Email Class in codeigniter with gmail, but i
In my application i want send a email to one account.in one button click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.