Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user = ""; //FTP Username
- $pass = ""; //FTP Password
- $ip = ""; //FTP Server IP
- $port = "513"; //FTP Port
- $gamefolder = ""; //Path to game folder
- $refreshpass = "test";
- //Workings, do not edit.
- if ($_POST["pass"] == $refreshpass){
- $fileloc = $gamefolder . "/data/EMB/chatlog.txt";
- $connection = ftp_connect($ip, $port);
- $login_result = ftp_login($connection, $user, $pass);
- ftp_fget($connection, "chatlog.txt", $fileloc, FTP_ASCII);
- ftp_close($connetion);
- }
- $file = fopen("chatlog.txt", "r");
- $text = fread($file,filesize("chatlog.txt"));
- fclose($file);
- echo($text);
- $thispage = $_SERVER['PHP_SELF'];
- echo("<form action=\"$thispage\" method=\"post\"><input type=\"password\" name=\"pass\" /><input type=\"submit\" value=\"Update\" /></form>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement