Page 1 of 1

build in php timeout or pause function

Posted: Tue May 30, 2006 8:54 pm
by psychotomus
does php have a built in timeout or pause function?

Posted: Tue May 30, 2006 8:55 pm
by feyd
yes.

Posted: Tue May 30, 2006 9:02 pm
by sweatje

Posted: Tue May 30, 2006 11:27 pm
by psychotomus

Code: Select all

if ( $_POST['exploring'] > 0 )
{
	for ($i=0;$i < $_POST['exploring']; $i++)
	{
		print 'you have explored an acre of land.<br>';
		flush();
		sleep(1);

	}

}
anybody know how come this wont show "you have explored an ancre of land" then pause for a second and show it again? or know any other ways to do this with just php.

Posted: Tue May 30, 2006 11:57 pm
by feyd
the web server may choose to buffer your output despite your wish to not buffer it.