14.08.2014, 18:55
PHP код:
<?php
//GetBans by iLinx
//October 11th/2009
//Retrieves the samp banlist from your server and echos it back in a neat fashion.
//Edited by ev0lution
//October 24th/2009
$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);
// Now for ev0lution's hax0rz
$exploded = explode("\n",$bans,1); // Split all by new line
for($x=0;$x<count($exploded);++$x) { // Loop through all lines
$pie = explode(" ",$exploded[$x],1); // Split line by the first space
echo $pie[1]."<br />"; // Echo the second part of the line then an HTML page break
}
?>
PHP код:
<?php
//GetBans by iLinx
//October 11th/2009
//Retrieves the samp banlist from your server and echos it back in a neat fashion.
//Edited by ev0lution
//October 24th/2009
$ftp_host = ""; //put the ip / hostname to your ftp here
$ftp_user = ""; //put your login here
$ftp_pass = ""; //put your password here
$banfile = "service15/samp03/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);
// Now for ev0lution's hax0rz
$exploded = explode("\n",$bans,1); // Split all by new line
for($x=0;$x<count($exploded);++$x) { // Loop through all lines
$pie = explode(" ",$exploded[$x],1); // Split line by the first space
echo $pie[1]."<br />"; // Echo the second part of the line then an HTML page break
}
?>