Jump to content

Making a "thread" or similar in PHP


lopolla

Recommended Posts

I have a frontend page lets call is "front.php" and a backend page lets call it "backend.php".

 

When I make actions I POST/GET data from front.php to backend.php, the script then runs (HTTP_REFERER) back to frontend.php. The problem is that sometimes I want to do quite time consuming actions in backend.php. Normally script has to end and afterwards refers you back to frontend.php. So the effect is that user have to wait for script to finish.

 

Is there some way how I am able to make an actions in backend.php - start som sort of independent sub-proces/thread or similar - and return to front.php without waiting for backend.php to finish.

 

My thought was that backend.php (the subproces/thread) could update database and then frontend.php could follow how the subproces/thread was doing....

 

Normally the time consuming handling consists of retrieving webpages on WWW and retrieve specific information which then is updated into a local database.

 

Hope someone understands and is able to assist me :)

If it is easy a short example would be extremly appriciated :)

 

 

All the best!

Edited by lopolla
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.