Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. $user = ""; //FTP Username
  4. $pass = ""; //FTP Password
  5. $ip = ""; //FTP Server IP
  6. $port = "513"; //FTP Port
  7. $gamefolder = ""; //Path to game folder
  8. $refreshpass = "test";
  9.  
  10. //Workings, do not edit.
  11. if ($_POST["pass"] == $refreshpass){
  12.     $fileloc = $gamefolder . "/data/EMB/chatlog.txt";
  13.     $connection = ftp_connect($ip, $port);
  14.     $login_result = ftp_login($connection, $user, $pass);
  15.     ftp_fget($connection, "chatlog.txt", $fileloc, FTP_ASCII);
  16.     ftp_close($connetion);
  17. }
  18. $file = fopen("chatlog.txt", "r");
  19. $text = fread($file,filesize("chatlog.txt"));
  20. fclose($file);
  21. echo($text);
  22. $thispage = $_SERVER['PHP_SELF'];
  23. echo("<form action=\"$thispage\" method=\"post\"><input type=\"password\" name=\"pass\" /><input type=\"submit\" value=\"Update\" /></form>");
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement