0

I need to print "Your download will begin in a moment" after a POST submit, right before you are redirected the download.

I do not have control over the file where the actual download occurs.

I tried to put an: echo 'Your download will begin in a moment'; right before the header("Location: https://download_example/index?xxxx=xxx"), but it just doesn't work. If you put anything after, well you're already redirected, nothing happens either.

This is in PHP!

Thank you! I've seen this before, i know it's possible!

dustbuster
  • 79,958
  • 7
  • 21
  • 41
  • 3
    Javascript using the timeout function or an http header redirect: https://stackoverflow.com/questions/6119451/page-redirect-after-certain-time-php – Erik Nedwidek Aug 16 '17 at 17:57

1 Answers1

1

you can use setTimeout function of javascript. for example

setTimeout(function(){
  window.location.href = "www.example.com"
},2000); // 2 second