Net_SFTP
[ class tree: Net_SFTP ] [ index: Net_SFTP ] [ all elements ]

Procedural File: SFTP.php

Source Location: /lib/3rdParty/phpseclib/Net/SFTP.php



Classes:

Net_SFTP
Pure-PHP implementations of SFTP.


Page Details:

Pure-PHP implementation of SFTP.

PHP versions 4 and 5

Currently only supports SFTPv3, which, according to wikipedia.org, "is the most widely used version, implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access to an SFTPv4/5/6 server.

The API for this library is modeled after the API from PHP's FTP extension.

Here's a short example of how to use this library:

  1.  <?php
  2.     include('Net/SFTP.php');
  3.  
  4.     $sftp new Net_SFTP('www.domain.tld');
  5.     if (!$sftp->login('username''password')) {
  6.         exit('Login Failed');
  7.     }
  8.  
  9.     echo $sftp->pwd("\r\n";
  10.     $sftp->put('filename.ext''hello, world!');
  11.     print_r($sftp->nlist());
  12.  ?>

LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




Tags:

author:  Jim Wigginton <terrafrost@php.net>
copyright:  MMIX Jim Wigginton
link:  http://phpseclib.sourceforge.net
license:  MIT License


Includes:

require_once('Net/SSH2.php') [line 60]
Include Net_SSH2






NET_SFTP_LOCAL_FILE [line 94]

NET_SFTP_LOCAL_FILE = 1
Reads data from a local file.



Tags:

see:  Net_SFTP::put()
access:  public

[ Top ]



NET_SFTP_LOG_COMPLEX [line 73]

NET_SFTP_LOG_COMPLEX = NET_SSH2_LOG_COMPLEX
Returns the message content



Tags:

see:  Net_SFTP::getLog()
access:  public

[ Top ]



NET_SFTP_LOG_SIMPLE [line 69]

NET_SFTP_LOG_SIMPLE = NET_SSH2_LOG_SIMPLE
Returns the message numbers



Tags:

see:  Net_SFTP::getLog()
access:  public

[ Top ]



NET_SFTP_STRING [line 98]

NET_SFTP_STRING = 2
Reads data from a string.



Tags:

see:  Net_SFTP::put()
access:  public

[ Top ]




Documentation generated on Tue, 09 Aug 2011 19:18:48 +0200 by phpDocumentor 1.4.1