Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("auth.php"); //include auth.php file on all secure pages ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Server Logs</title>
- <link rel="stylesheet" href="css/style.css" />
- </head>
- <body>
- <div class="form">
- <?php
- $ftp_server = "149.202.249.9";
- $ftp_user = "160";
- $ftp_pass = "654fearboss";
- // open some file for reading
- $file = 'index.php';
- $fp = fopen($file, 'w');
- $conn_id = ftp_connect($ftp_server);
- $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
- // Initate the download
- $ret = ftp_nb_fget($conn_id, $fp, $file, FTP_BINARY);
- while ($ret == FTP_MOREDATA) {
- // Do whatever you want
- echo ".";
- // Continue downloading...
- $ret = ftp_nb_continue($conn_id);
- }
- if ($ret != FTP_FINISHED) {
- echo "There was an error downloading the file...";
- exit(1);
- }
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement