fmp Posted August 23, 2006 Share Posted August 23, 2006 Hey all :)I've a script that takes POST data, processes it in several ways, then sends the data off in a "repost" using fput to another website address, then makes its ending response.The fputting is all done via a custom function. But depending on the remote site, this can take a few seconds to process.I want to be able to run my custom fput function, then just continue script execution. As opposed to waiting for fput function to finish.I've done some searching, the only thing I could turn up were "exec" tricks. I wanted to avoid such methods. Doesn't PHP have a simple way of executing commands/functions in the background? Wow that would speed a lot of things up for the end-user.Thank you in advance for your help! Quote Link to comment Share on other sites More sharing options...
trq Posted August 23, 2006 Share Posted August 23, 2006 [quote]Doesn't PHP have a simple way of executing commands/functions in the background?[/quote]Put simply, no. You could however look into forking though it is NOT recomended within a web server environment and in most cases would actually be disabled on a shared server. Quote Link to comment Share on other sites More sharing options...
fmp Posted August 23, 2006 Author Share Posted August 23, 2006 Well thats just silly :) But I can understand the nature of such a feature would prolly be a lot more complicated in implementation than it is in ideaBack to the drawing board ::) Quote Link to comment Share on other sites More sharing options...
lessthanthree Posted August 23, 2006 Share Posted August 23, 2006 Have you looked at running some sort of Javascript implementation...I hate using the word, but some kind of AJAX methodology sounds like what you require here.....In simple terms, you can have a javascript run on your main page, that sends any requests to a php page running in the "background"...the JS page is able to make changes to the page a viewer is seeing when the php has finished. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.