I'd like to know if I can run code after a location header is done ? My code does the unlink function before the header has finished.
header('HTTP/1.1 307 Temporary Redirect');
header("Location: $file_url");
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
header('Pragma: no-cache');
unlink($fileName);'''
The unlink function is made before the file download which is not good for what I try to do.
Any ideas?