Jump to content

Launch file in background and then redirect page


everisk

Recommended Posts

Hello,

 

Now I'm using iframe to launch the script in background and meta redirect to redirect page. However, the problem is it seems like the system has to wait for background_script to completely loaded before redirecting. Is there any other way to do this?

 

Any help is greatly appreciated. Thanks!

 

echo '<iframe src="background_script.php" width="0" height="0"></iframe>';
echo '<meta http-equiv="Refresh" content="0; url=../context/redirect-to.php">';

Link to comment
Share on other sites

I have done a bit more research and found that exec() might not work on some windows environment :(

 

I tried with cURL and get it working to a certain extent, but then the problem is that my script checks session id for security and the page that gets called by cURL does NOT retain the same session id as the parent script. Is there any way to force cURL to use the same session id as the parent script? I tried passing the session id and set it in the target script before checking it, but the script just halts. :(

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.