<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									php, simple ob_start() - BugOverflow				            </title>
            <link>https://muszak.eu/community/bugoverflow/php-simple-ob_start/</link>
            <description>muszak.eu Forum dyskusyjne</description>
            <language>pl-PL</language>
            <lastBuildDate>Sun, 08 Mar 2026 13:47:10 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: php, simple ob_start()</title>
                        <link>https://muszak.eu/community/bugoverflow/php-simple-ob_start/#post-467</link>
                        <pubDate>Wed, 27 Jun 2018 08:58:08 +0000</pubDate>
                        <description><![CDATA[1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
&nbsp; &nbsp;function simple_ob_start&#040;&#041;
&nbsp; &nbsp;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; ini_set&#040;&quot;zlib.output_compression&amp;q...]]></description>
                        <content:encoded><![CDATA[<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href=";" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple" style="height: 252px"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="de1"><pre class="de1">&nbsp; &nbsp;<span class="kw1">function</span> simple_ob_start<span class="br0">&#040;</span><span class="br0">&#041;</span>
&nbsp; &nbsp;<span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; ini_set<span class="br0">&#040;</span><span class="co3">&quot;</span>zlib.output_compression<span class="co3">&quot;</span>, <span class="nu0">0</span><span class="br0">&#041;</span>; 
&nbsp; &nbsp; &nbsp; &nbsp; ini_set<span class="br0">&#040;</span><span class="co3">&quot;</span>implicit_flush<span class="co3">&quot;</span>, <span class="nu0">1</span><span class="br0">&#041;</span>; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#040;</span>ob_get_level<span class="br0">&#040;</span><span class="br0">&#041;</span> == <span class="nu0">0</span><span class="br0">&#041;</span> ob_start<span class="br0">&#040;</span><span class="br0">&#041;</span>;
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="co3">&quot;</span>Starting live process...<span class="co3">&quot;</span>;
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#040;</span><span class="re1">$i</span> = <span class="nu0">1</span>; <span class="re1">$i</span><span class="sy0">&lt;</span><span class="nu0">100</span>; <span class="re1">$i</span>++<span class="br0">&#041;</span> 
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="co3">&quot;</span>current step <span class="re1">$i</span> of <span class="nu0">100</span><span class="co3">&quot;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> str_pad<span class="br0">&#040;</span><span class="co3">'</span><span class="co3">'</span>,<span class="nu0">4096</span><span class="br0">&#041;</span>.<span class="co3">&quot;</span>n<span class="co3">&quot;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ob_flush<span class="br0">&#040;</span><span class="br0">&#041;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flush<span class="br0">&#040;</span><span class="br0">&#041;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span><span class="br0">&#040;</span><span class="nu0">2</span><span class="br0">&#041;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="co3">&quot;</span>Done.<span class="co3">&quot;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; ob_end_flush<span class="br0">&#040;</span><span class="br0">&#041;</span>;
&nbsp; &nbsp; <span class="br0">&#125;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">   function simple_ob_start()
   {
        ini_set("zlib.output_compression", 0); 
        ini_set("implicit_flush", 1);  
        if (ob_get_level() == 0) ob_start();

        echo "Starting live process...";

		for ($i = 1; $i&lt;100; $i++) 
		{
			echo "current step $i of 100";
		    echo str_pad('',4096)."n";
            ob_flush();
            flush();
            sleep(2);
		}
        echo "Done.";
        ob_end_flush();
    }</pre></div></div>]]></content:encoded>
						                            <category domain="https://muszak.eu/community/bugoverflow/">BugOverflow</category>                        <dc:creator>mrmucha</dc:creator>
                        <guid isPermaLink="true">https://muszak.eu/community/bugoverflow/php-simple-ob_start/#post-467</guid>
                    </item>
				                    <item>
                        <title>php, simple ob_start()</title>
                        <link>https://muszak.eu/community/bugoverflow/php-simple-ob_start/#post-466</link>
                        <pubDate>Wed, 27 Jun 2018 08:54:20 +0000</pubDate>
                        <description><![CDATA[refresh site during calculation, process on page]]></description>
                        <content:encoded><![CDATA[refresh site during calculation, process on page]]></content:encoded>
						                            <category domain="https://muszak.eu/community/bugoverflow/">BugOverflow</category>                        <dc:creator>mrmucha</dc:creator>
                        <guid isPermaLink="true">https://muszak.eu/community/bugoverflow/php-simple-ob_start/#post-466</guid>
                    </item>
							        </channel>
        </rss>
		