title: How to speed up file_get_contents()? or any alternative way
body: <p>I have a website scraping project. Look at this code:</p>
  
  <pre><code>&lt;?php
  include('db.php');
  $r = mysql_query("SELECT * FROM urltable");
  $rows=  mysql_num_rows($r);
  for ($j = 0; $j &lt;$rows; ++$j) {
  $row = mysql_fetch_row($r);
  $html = file_get_contents(mysql_result($r,$j,'url'));
  $file = fopen($j.".txt", "w");
  fwrite($file,$html);
  fclose($file);
  }
  ?&gt;
  </code></pre>
  
  <p>I have a list of url. This code means that, make text files using the contents(HTML) from each url. </p>
  
  <p>When  running this code, I can make only one file per second [each file size~ 20KB]. My internet is providing 3mbps downloading speed, but I can't utilize that speed with this code.</p>
  
  <p>How do I speed up <code>file_get_contents()</code>? Or how do I speed up this code using threading or configure  php.ini file or any other methods?</p>