Jump to content

Archived

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

fmp

FPUT in background??

Recommended Posts

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!

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
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 idea


Back to the drawing board  ::)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.