Jump to content

continous execution - client logout


crisl

Recommended Posts

Hello,

 

i've got a problem with one of my script:

here is the code

		ignore_user_abort(false);
		header("Content-Type: " . $ressource['mimetype']);
		header('Content-length: ' . $taille);
		header('Content-Disposition: filename="' . $file_name . '"');
		header('Cache-Control: no-cache');
		$fp = fopen($file,"rb");
		$taillefichier = filesize($file);
		$offset = 0;
		while(!feof($fp))
		{
			$meuh = fread($fp,8192-$offset);
			echo $meuh;
			if(feof($fp))
			{
				$offset = $taillefichier;
			}

		}

 

This script is created to simulate a video streaming, i use a flash player http://www.longtailvideo.com/players/jw-flv-player/ to read the stream.

In my page, i have a link to previous and next video and the video player

My problem is: when reading a file, if i try to click to request viewing a new video, the browser have to wait all the video loading.

 

If the video takes 5 mins to load all the video stream, the browser is hanging during 5 minutes, then it load the new video...

 

Can you help me?

 

Thanks in advance for your help

 

Christophe

 

 

Link to comment
https://forums.phpfreaks.com/topic/190515-continous-execution-client-logout/
Share on other sites

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.