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

  • Home
  • SEARCH
  • 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 8947587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:48:02+00:00 2026-06-15T12:48:02+00:00

I’m developing a game based on Html5, JavaScript (jQuery) and ajax with the use

  • 0

I’m developing a game based on Html5, JavaScript (jQuery) and ajax with the use of PHP as Server Side. Now what is in the game is, there is a different types of jobs that you can assign to you players as per Job time duration. Suppose I have assign one jobJOB1 to one playerPLAYER1 with the duration of 10 minutes and other job JOB2 to other player PLAYER2 with the duration of 30 minuted. Means,

PLAYER1 = JOB1(10MINS)
PLAYER2 = JOB2(30MINS)

Now I want to create multithreading in PHP to handle this two jobs parallel and get the request to client side after every minute complete of that job.

I know that there are various ways to create multithreading in PHP and I can send the request to PHP server to create the thread when job is started with the use of ajax, but how can I get the data back to the client side and display the data after every minute?

It is possible or not? What are other options to do the same thing?

  • 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-15T12:48:04+00:00Added an answer on June 15, 2026 at 12:48 pm

    I think this is more of a task for multiprocessing rather than multithreading.

    To create another PHP thread you would use something like pcntl_fork:

    http://php.net/manual/en/function.pcntl-fork.php

    But in a request/response type situation, such as HTTP, you would more likely start a seperate process and then poll it from the client.

    To do such a thing with PHP you would create another process on the CLI using the & operator (linux only, if you need windows let me know and Ill update the answer), and he poll it using either:

    • A file, which the process outputs status information to it,
    • A database, likewise as above,
    • Or a shared memory segment: http://php.net/manual/en/book.shmop.php
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

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.