Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.118.28.160
<?php
//echo shell_exec('C:\xampp\php\php.exe "' . __DIR__ . '/log.php" 2>&1');
//shell_exec('#!/usr/bin/env ruby');
//$rfilename = $_SERVER['DOCUMENT_ROOT'].'/live100/sales_10000007.txt';
//$output = shell_exec("prn sales_10000007.txt");
//$results = shell_exec('prn *.txt');
# cat thesis.txt > /dev/lp
//$output = shell_exec("# cat sales_10000007.txt > /dev/lp");
//echo "<pre>$output</pre>";
//echo "Printed";
// define some variables
$ftp_server = "72.167.46.92"; // Address of FTP server.
$ftp_user_name = "sandeep"; // Username
$ftp_user_pass = "logisys@159"; // Password
// set up basic connection
$conn_id = ftp_connect($ftp_server);
$local_file = 'downloads/sales_10000008.txt';
$server_file = 'live100/sales_10000007.txt';
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// try to download $server_file and save to $local_file
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
echo "Successfully written to $local_file\n";
} else {
echo "There was a problem\n";
}
// close the connection
ftp_close($conn_id);
?>
|