Flushing is Impossible for me please help!

Discussion in 'PHP' started by adbox, Feb 20, 2010.

  1. #1
    Hey,

    I am hosted with host monster and no matter what I do I cannot get flushing to work. I've coppied my simple code below. I;ve read so much and tried all tips and tricks with no success, and hostmonster themselves were going to help me but they have not gotten back with me.

    
    <?php
    ob_implicit_flush(1);
    ob_end_flush();
    ob_start();
    
    $count=20;
    ?>
    
    <br><br>
    
    <?php
    for($key=0;$key<$count;$key++)
    {
    ?>
      <table style="margin-left:auto;margin-right:auto;width:700px;font-size:11px;border: solid 1px #eeeeee;">
    
      <tr style="background-color: <?php echo $bgcolor; ?>;">
    	<td width=550 valign=top>
    		content
    	</td>
    	<td width=200 valign=top>
    	content
    	</td>
    	<td width=200 valign=top>
    	content
    	</td>
      </tr>
      </table>
      <?php
      ob_flush();
      flush();
      sleep(1);
      //flush();
    } 
    
      
    ?>
    </table>
    
    Code (markup):
    I really appreciate any help on this. I need it to complete my new plugin.

    adbox
     
    adbox, Feb 20, 2010 IP
  2. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    First of all, interesting thread title :)

    Second, is it absolutely VITAL that you need those functions? If it is, it may be better if you switched hosts, else just find a workaround, or at the least, tell us what you need those functions for.
     
    Marshton, Feb 21, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    Is this some sort of css progress bar powered by output buffering?
     
    danx10, Feb 21, 2010 IP
  4. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #4
    lol didnt even realize.

    I am creating a plugin that determines what pages on a site are indexed by google. The volume of pages causes the script to process awhile, so I want to flush the output as it goes. So there needs to be a universal solution. Or else I wont be able to release it as a plugin.

    Thanks for any and all help
     
    adbox, Feb 21, 2010 IP