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 8309267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:03:48+00:00 2026-06-08T19:03:48+00:00

OK, here’s the situation – simple and clear : On Page A : We

  • 0

OK, here’s the situation – simple and clear :

  • On Page A : We perform an ajax request (let’s say to intermediate.php) which initiates a background process – let’s say back.php
  • interm.php returns
  • back.php keeps working until it finishes, while updating its progress in a db.

So, how could Page A get notified that back.php has finished?

(I’ve thought e.g. of firing an ajax request every 1-2 secs to a script checking the db for back.php‘s progress, but that seems pretty weird and definitely not efficient…)

Any ideas?

  • 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-08T19:03:49+00:00Added an answer on June 8, 2026 at 7:03 pm

    You could do a long-polling or short-polling technique which is quite common and not so weird. It does make a lot of unnecessary requests, but it’s the simplest and most supported method out there.

    The second method would be using web sockets. Now web sockets through html5 are not generally supported as of now, but an alternative would be to use a library that takes care of fallbacks to other methods such as flash, or even long-polling if your browser / device doesn’t support a previous method. A really good library for real-time communication would be Socket.IO. It allows many different implementations of real-time or close to real-time, it also allows you to choose which method of communication you want to use. Some cloud based web services such as Paas don’t widely support web sockets. Libraries will go around this by letting you choose or force a specific method of communication: Web Sockets, Flash Sockets, Long-Polling, etc..

    But since your using php, you could try this: https://github.com/lemmingzshadow/php-websocket

    • http://www.htmlgoodies.com/html5/other/create-a-bi-directional-connection-to-a-php-server-using-html5-websockets.html#fbid=8Pw-Juo8eHG
    • Slightly different approach
    • http://www.gamedev.net/topic/613642-socketio-php-mysql/
    • http://devzone.zend.com/209/writing-socket-servers-in-php/
    • socket.io + php + is this a realistic solution at this point in time

    Though as mentioned on some of these sites, using websockets with php is not as straight forward as node.js or twisted python. But nonetheless it’s achievable and does work at some degree. I found that having a node.js backend to do the real-time stuff is a lot easier then trying to force a technology that is not meant to be worked in that way.

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

Sidebar

Related Questions

Here an example of my checkbox list http://jsfiddle.net/YnM2f/ Let's say I check on G
Here is my code (Say we have a single button on the page that
Here a simple question : What do you think of code which use try
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here is what I am currently doing. PHP echo's out the recent post in
Here is a simple timepicker to jQuery UI's datepicker <script type=text/javascript> /* <![CDATA[ */
here is my php code $titikPetaInti = array(); while($row = mysql_fetch_assoc($hasil2)) { $titikPetaInti[] =
Here's what I'm doing. I want to upload multipart file via Ajax to my
Here is my code sample, let me know if it can be further improved?
Here is what I am trying to achieve in PHP: I have this string:

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.