title: Prevent timeout during large request in PHP
body: <p>I'm making a large request to the brightcove servers to make a batch change of metadata in my videos. It seems like it only made it through 1000 iterations and then stopped - can anyone help in adjusting this code to prevent a timeout from happening? It needs to make about 7000/8000 iterations.</p>
  
  <pre><code>&lt;?php
  include 'echove.php';
  
  $e = new Echove(
      'xxxxx',
      'xxxxx'
  );
  
  // Read Video IDs
  # Define our parameters
  $params = array(
      'fields'         =&gt; 'id,referenceId'
  
  );
  
  # Make our API call
  $videos = $e-&gt;findAll('video', $params);
  
  
      //print_r($videos);
      foreach ($videos as $video) {
  
          //print_r($video);
          $ref_id = $video-&gt;referenceId;
          $vid_id = $video-&gt;id;
  
          switch ($ref_id) {
              case "":
                  $metaData = array(
                      'id' =&gt; $vid_id,
                      'referenceId' =&gt; $vid_id
                  );
  
                  # Update a video with the new meta data
                  $e-&gt;update('video', $metaData);                
                  echo "$vid_id updated sucessfully!&lt;br /&gt;";
                  break;
              default:
                  echo "$ref_id was not updated. &lt;br /&gt;";
                  break;
          }
      }
  ?&gt;
  </code></pre>
  
  <p>Thanks!</p>