Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ftp_host = ""; //put the ip / hostname to your ftp here
- $ftp_user = ""; //put your login here
- $ftp_pass = ""; //put your password here
- $banfile = "samp.ban";
- $con = ftp_connect($ftp_host) or die("Couldnt connect to your ftp (check your settings!");
- ftp_login($con, $ftp_user, $ftp_pass);
- ftp_get($con, "ban.txt", $banfile, FTP_ASCII);
- ftp_close($con);
- $file = fopen("ban.txt", "r");
- @ $bans = fread($file, filesize("ban.txt"));
- fclose($file);
- $aBansRegex = '/(.*?).(.*?).(.*?).(.*?) (.*?)/';
- preg_match($aBansRegex, $bans, $aMatches);
- $aBans = trim($aMatches[5]);
- echo nl2br($aBans);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement