Jocka Posted August 14, 2006 Share Posted August 14, 2006 Is there a way to do this in PHP, if there is then I'm not that educated in PHP yet lol. I'm sure it requires JAVASCRIPT too if it is infact possible.I could have swore there was a small tutorial on here somewhere but I couldn't find one.Is there a way to do this. I want to do it for those LONG database searches, so it shows the users "It's almost done" lol. Just something "neat" to look at really. I don't need it but I'd like to have it. Quote Link to comment Share on other sites More sharing options...
zq29 Posted August 14, 2006 Share Posted August 14, 2006 You'll need something like JavaScript for this, maybe even using an Ajax technique. Quote Link to comment Share on other sites More sharing options...
Jocka Posted August 14, 2006 Author Share Posted August 14, 2006 I'm thinking I can just make it do it set by an "average" load time based on connection speed.. It won't be completely accurate but it'll be close Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 14, 2006 Share Posted August 14, 2006 Well, i *think* you do it using flush()...<?phpfor ($i = 0; $i<10; $i++){echo " Line $i<br />";flush();sleep(1);}echo "Done.";?> Run that and you will notice that it doesn't wait for the script to finish to output the data. So, i believe you can echo things to the browser at strategic points and then use flush().I am using sleep() to simulate a long script here. Quote Link to comment Share on other sites More sharing options...
ylkien Posted December 6, 2006 Share Posted December 6, 2006 if flush() doesn't work, tryob_flush();flush(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.