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">';

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. :(

Archived

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

×
×
  • 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.