title: Read results of a PHP array, in real time with Javascript
body: <p>I certainly can't solve this problem by myself after a few many days already trying. This is the problem:</p>
  
  <p><strong>We need to display information on the screen (HTML) that is being generated in real time inside a PHP file.</strong></p>
  
  <p><strong>The PHP is performing a very active crawling, returning huge arrays of URLs, each URL need to be displayed in real time in HTML, as soon as the PHP captures it,</strong> that's why we are using Ob_flush() and flush methods to echo and print the arrays as soon as we got them.</p>
  
  <p>Meanwhile we need to display this information somehow so the users can see it while it works (since it could take more than one hour until it finishes).</p>
  
  <p><strong>It's not possible to be done, as far as I understand, with AJAX, since we need to make only 1 request and read the information inside the array.</strong> I'm not either totally sure if comet can do something like this, since it would interrupt the connection as soon as it gets new information, and the array is really rapidly increasing it's size.</p>
  
  <p>Additionally and just to make the things more complex, there's no real need to print or echo the information (URLs) inside the array, since the HTML file is being included as the User Interface of the same file that is processing and generating the array that we need to display.</p>
  
  <p><strong>Long story short; we need to place here:</strong></p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      ...
  &lt;/ul&gt;
  </code></pre>
  
  <p><strong>A never ending and real time updated list of URLS being generated  and pushed inside an array, 1,000 lines below, in a PHP loop.</strong></p>
  
  <p>Any help would be really more than appreciated.
  Thanks in advance!</p>