Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php include("auth.php"); //include auth.php file on all secure pages ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>Server Logs</title>
  7. <link rel="stylesheet" href="css/style.css" />
  8. </head>
  9. <body>
  10. <div class="form">
  11. <?php
  12. $ftp_server = "149.202.249.9";
  13. $ftp_user = "160";
  14. $ftp_pass = "654fearboss";
  15.  
  16. // open some file for reading
  17. $file = 'index.php';
  18. $fp = fopen($file, 'w');
  19.  
  20. $conn_id = ftp_connect($ftp_server);
  21.  
  22. $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
  23.  
  24. // Initate the download
  25. $ret = ftp_nb_fget($conn_id, $fp, $file, FTP_BINARY);
  26. while ($ret == FTP_MOREDATA) {
  27.  
  28. // Do whatever you want
  29. echo ".";
  30.  
  31. // Continue downloading...
  32. $ret = ftp_nb_continue($conn_id);
  33. }
  34. if ($ret != FTP_FINISHED) {
  35. echo "There was an error downloading the file...";
  36. exit(1);
  37. }
  38. </div>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement