I'm assuming ob_ functions are what I'm going to need for this, but I'm stuck on exactly how to do it. I've been experimenting with ob_start(); ob_flush(); and stuff like that, but I just can't get my desired result :\
I want to have a type of loading thing, almost like
echo "processing";
insert into db blah blah blah
echo "calculating";
for($i=0;$i<$num;$i++){
$val = $val2*$val2 / 2 + $val;
}
echo "Done.";
echo "Value: " . $val;
it wont be really like that, but as a general thing, how would i go about doing that?
output buffering question
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
I've briefly tried to do similar things using PHPs ob_* functions but didn't succeed. So anyway, if anyone replies to this post and helps him out I would also benefit 
Last edited by nigma on Sun Feb 29, 2004 12:00 pm, edited 1 time in total.
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
I would go about this using ob_start with a callback function.
Every time you ouput something that function gets called and you can increase the percentage of "loaded". But (and here lies the dead fox), you'll need to break the output buffering to display the percentage/output.
Do bear in mind that you can't "refresh" the screen from PHP.
Every time you ouput something that function gets called and you can increase the percentage of "loaded". But (and here lies the dead fox), you'll need to break the output buffering to display the percentage/output.
Do bear in mind that you can't "refresh" the screen from PHP.
Lil, take a look:
http://www.dnsstuff.com/tools/tracert.ch?ip=google.com
are you talking about something like that?
Check html source of that page.
http://www.dnsstuff.com/tools/tracert.ch?ip=google.com
are you talking about something like that?
Check html source of that page.