-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.php
36 lines (22 loc) · 839 Bytes
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @author James Standbridge <[email protected]>
*/
require 'vendor/autoload.php';
use App\Service\FileTransferer;
$transferer = new FileTransferer();
$transferer->setSender("194.62.96.136", "be91976-1773", "yMjMJ6G7CRPbw3HVMysnaoSs8QiJga");
$transferer->setReceiver("178.33.25.159", "bn25189-1618", "82JqkjFQkjfIQpMyTrqQ");
var_dump($transferer->test());
// $resFile = fopen(
// "ssh2.sftp://sftpIVRBOEKI:aZE*[email protected]:22/TALEND_test/GET/test.xml",
// "r"
// );
// $srcFile = fopen(
// "ssh2.sftp://root:[email protected]:22/var/www/test_folder/test.xml",
// 'w'
// );
// $writtenBytes = stream_copy_to_stream($resFile, $srcFile);
// fclose($srcFile);
// fclose($resFile);
unlink("ssh2.sftp://sftpIVRBOEKI:aZE*[email protected]:22/TALEND_test/GET/test.xml");