Hi Everyone!!
This is my first post :-)
I have a web page with several embedded videos which are called with php.
Each video is loaded with this script (this is part of the script...which actually loads the videos)...
$file = fopen($local_file, "r");
while(!feof($file))
{
// send the current file part to the browser
print fread($file, round($download_rate * 1024));
// flush the content to the browser
flush();
// sleep one second
sleep(1);
}
fclose($file);
it works fine...but, every time I click a link to a different page on the website I need to wait untill the loop finishes...and all the videos are loaded...this takes a long time...because many of the videos are large files.
The browser waits untill the loop finishes and only then processes the request.
What I'd like is to keep the exact
while(!feof($file))
loop, but break the loop,[/B] if any link was clicked.. (I'd like to process other requests)...
I searched for a solution, tried a few things but nothing worked
please help.....
Thanks,
Joel