Jump to content

FPUT in background??


fmp

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!
Link to comment
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.
Link to comment
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.
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.