Jump to content

Making a "thread" or similar in PHP


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!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • 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.