Your code is almost correct, but for one thing:
You're trying to use $end before it is defined, in the first line:
<?php header ("Content-type: multipart/x-mixed-replace;boundary=$end"); ?>
Change this a little, and make it like so (I've split the lines a little to make it more readable)
<?php
$end="Finish"
header("Content-type: multipart/x-mixed-replace;boundary=$end");
?>
You can then remove where you set $end later in the script, so as not to redefine it.
This code is fine, as you won't be outputting any text before the header function (As long as there are no spaces above the PHP open <?php )
Hopefully, this will do the job as required, if not, I don't know the server, so I would suggest going to someone else for that as it no longer seems to be a PHP problem. 🙂#
Scautura