title: Sockets - time out
body: <p>im trying to connect to a wsdl service , 
  but getting this error:</p>
  
  <p>wsdl error: Getting <a href="http://api.didww.com/api/?wsdl" rel="nofollow noreferrer">http://api.didww.com/api/?wsdl</a> - HTTP ERROR: socket read of headers timed out</p>
  
  <p>locally there is no problem, but on the remote server i get this error.</p>
  
  <p>remote server: Linux CentOS (FreePBX)</p>
  
  <p>the code:</p>
  
  <pre><code>$client = new soapclient($site, true);
  $err = $client-&gt;getError();
  if ($err)
  {
      echo 'ERROR: ' . $err . '&lt;/pre&gt;';
  }
  
  $username = 'XXXX';
  $_key = 'YYYY';
  $auth_string = sha1($username.$_key);
  
  $arr = array();
  $arr[0] = $auth_string;
  $arr[1] = $country_id;
  
  $result = $client-&gt;call('getcities', $arr);
  
  if ($client-&gt;fault)
  {
      echo '&lt;pre&gt;';
      print_r($result);
      echo '&lt;/pre&gt;';
  }
  else
  {
      $err = $client-&gt;getError();
      if ($err)
      {
          echo 'Error: &lt;pre&gt;' . $err . '&lt;/pre&gt;';
      }
  }
  echo '&lt;pre&gt;';
  print_r($result);
  echo '&lt;/pre&gt;';
  </code></pre>