title: ssh2_scp_send() using php corrupts pdf
body: <p>I am having a problem when I am sending a pdf file to my server.</p>
  
  <p>my script works when I try to send .csv file but the problem occurs when I try to send a pdf file  </p>
  
  <pre><code>    &lt;?php
      $user= "username";
      $pass= "password";
      $src= "/home/desktop/myfile.pdf";
      $trg= "/server/path/myfile.pdf";
  
      $con = ssh2_connect('myserver.com', 22);
      ssh2_auth_password($con, $user, $pass);
  
      ssh2_scp_send($con, $src, $trg);
      ?&gt;
  </code></pre>
  
  <p>when I send pdf. it creates a pdf file in target location but its corrupted.</p>