title: php's execution time and memory limit
body: <p>I am using centOS 5 server. i got the error while i was attempting to download 1GB of file from server to my server that</p>
  
  <pre><code>maximum execution time exceeded.
  </code></pre>
  
  <p>i opened my php.ini file, it was written there</p>
  
  <pre><code>max_execution_time = 30     ; Maximum execution time of each script, in seconds
  max_input_time = 60     ; Maximum amount of time each script may spend parsing request data
  memory_limit = 128M      ; Maximum amount of memory a script may consume
  </code></pre>
  
  <p>in last line it is written <code>Maximum amount of memory a script may consume</code> so what does it mean actually? it will not download more than this per script execution or its about the memory taken by script to be executed (sharing types)
  i searched but not got the answer of this. Please if any one can tell me what it mean exactly and how can i be able to download approx 1GB of data through script from other server using PHP.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>code i am using to download the file from server using curl</p>
  
  <pre><code>$username = "user";
  $password = "pwd";
  $url = "http://domain.com/feeds/";
  
  global $ch;
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
  curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
  $output = curl_exec($ch);
  $r = time()-(24*60*60); 
  $dateit = date("Ymd", $r);
  $file8 = "abc".$dateit.".tbz";
  $file3 = "abc".$dateit.".tbz.md5";
  $file5 = "xyz".$dateit.".tbz";
  $file4 = "xyz".$dateit.".tbz.md5";
  $file7 = "lmn".$dateit.".tbz";
  $file2 = "lmn".$dateit.".tbz.md5";
  $file6 = "pqr".$dateit.".tbz";
  $file1 = "pqr".$dateit.".tbz.md5";
  $arr = array($file1, $file2, $file3, $file4, $file5, $file6);
  for($i=0;$i&lt;=4;$i++)
  {
  
   $url = "http://domain.com/feeds/current-data/".$arr[$i];
   curl_setopt($ch, CURLOPT_URL, $url);
  
   $fp = fopen("adminArea/folder1/".$arr[$i], 'w+');
   curl_setopt($ch, CURLOPT_FILE, $fp);
   curl_exec ($ch);
  
  }
  fclose($fp);
  curl_close($ch);
  </code></pre>
  
  <p>Any idea help link or view will be highly appreciated.</p>