title: How to use imap with fsockopen behind proxy
body: <pre><code>&lt;?php
  set_time_limit(0); 
  ignore_user_abort(true);
  ini_set('max_execution_time', 0);
  
  
  // 207.46.10.10:993 hotmail imap server 
  
  $s = "\r\n";
  
  $proxy = '13.89.36.103'; // proxy
  $port =53;
  
  $fp = fsockopen($proxy, $port);
  //socket_set_timeout($fp, 10, 0);
  
  fputs($fp, "CONNECT 207.46.10.10:993 HTTP/1.1".$s.$s);
  fputs($fp, "n1 login user@hotmail.com userpassword".$s);
  fputs($fp, "n2 select Inbox".$s);
  fputs($fp, "n3 UID FETCH 100289 BODY[]".$s);
  fputs($fp, "n4 LOGOUT".$s.$s);
  
  while(!feof($fp)){
      $line = fgets($fp, 4000);
      echo $line."\n";
  }
  fclose($fp);
  ?&gt;
  </code></pre>
  
  <p>Is it possible to use a proxy connection to read mail from a imap server using PHP's</p>
  
  <p><strong><em>it work fine without proxy</em></strong><br>
  please if someone can help me i don't want to use curl </p>