Jump to content

Forward To Site While Time Consuming Script Executes..?


Recommended Posts

I have script that takes a POST request and executes a function based on the POST Vars that takes from 30-60 seconds to finish.. then does a Header('Location: XXX'); to a website.. Is there anyway to have the script forward to the site first then perform the time consuming function in the background without having the browser page stuck on loading for a 30-60 seconds..?

Link to post
Share on other sites

Simply doing the location at the start should be sufficient... PHP should continue until its max_execution_time.If that fails, try to instead use header('Refresh: 0; url=XXX');

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...