Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $host = "s1.servhost.pl";
  2. $user = "...";
  3. $password= "...";
  4. $path = "/";
  5. $pftpconnection = ftp_connect($host);
  6.  
  7.  
  8. if($pftpconnection)
  9. {
  10. @ftp_login($pftpconnection, $user, $password);
  11. $parent = substr($path, 0, strrpos($path, "/"));
  12. ftp_chdir($pftpconnection,$path);
  13. }
  14. $filename = "server_log.txt";
  15. if(file_exists($filename))
  16. {
  17. $lines = file("$filename");
  18. foreach ($lines as $line)
  19. {
  20. $string .= "<Br>".$line;
  21. }
  22. }
  23. echo $string;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement