[Tool/Web/Other] [PHP] SA-MP Website Banlist Parser
#37


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"$banfileFTP_ASCII);
    
ftp_close($con);
    
$file fopen("ban.txt""r");
    
$bans fread($filefilesize("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"$banfileFTP_ASCII);
    
ftp_close($con);
    
$file fopen("ban.txt""r");
    
$bans fread($filefilesize("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
  
}
?>
Reply


Messages In This Thread
[PHP] SA-MP Website Banlist Parser - by iLinx - 03.12.2009, 01:48
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by Christopher. - 03.12.2009, 15:27
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by Luka P. - 03.12.2009, 15:29
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by Joske_Vermeulen - 03.12.2009, 15:45
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by KKashimia - 03.12.2009, 16:59
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by iLinx - 03.12.2009, 20:00
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by kukars22 - 07.12.2009, 22:44
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by iLinx - 07.12.2009, 22:54
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by kukars22 - 07.12.2009, 23:02
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by iLinx - 07.12.2009, 23:07
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by kukars22 - 07.12.2009, 23:17
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by iLinx - 07.12.2009, 23:37
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by lolumadd - 08.12.2009, 01:16
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by Bayler - 18.01.2010, 01:53
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by iLinx - 18.01.2010, 02:04
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by Bayler - 18.01.2010, 02:17
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by kevinwalter - 18.01.2010, 17:25
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by thiaZ_ - 18.01.2010, 18:57
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by WardenCS - 19.01.2010, 04:51
Re: [PHP] Format your banlist [make it look however you want] (banlist parser cl - by RenisiL - 19.01.2010, 11:24
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by thiaZ_ - 29.01.2010, 12:45
Re: [PHP] Format your banlist [make it look however you want] (banlist parser class) - by thiaZ_ - 03.02.2010, 15:32
Re: [PHP] SA-MP Website Banlist Parser - by iLinx - 20.03.2010, 00:24
Re: [PHP] SA-MP Website Banlist Parser - by iLinx - 20.03.2010, 23:25
Re: [PHP] SA-MP Website Banlist Parser - by bpeterson - 25.03.2010, 18:12
Re: [PHP] SA-MP Website Banlist Parser - by iLinx - 27.03.2010, 17:00
Re: [PHP] SA-MP Website Banlist Parser - by coole210 - 23.05.2010, 03:17
Re: [PHP] SA-MP Website Banlist Parser - by park4bmx - 23.05.2010, 08:26
Re: [PHP] SA-MP Website Banlist Parser - by XmLmX2_RK - 16.07.2010, 15:05
Re: [PHP] SA-MP Website Banlist Parser - by androm - 03.11.2010, 20:37
Re: [PHP] SA-MP Website Banlist Parser - by M.5 - 29.08.2011, 08:48
Re: [PHP] SA-MP Website Banlist Parser - by mihan-888 - 31.12.2011, 08:18
Re: [PHP] SA-MP Website Banlist Parser - by kidor - 28.06.2012, 07:43
Respuesta: [PHP] SA-MP Website Banlist Parser - by javi - 21.08.2012, 09:45
Re: [PHP] SA-MP Website Banlist Parser - by Nikid - 09.02.2013, 01:24
Re: [PHP] SA-MP Website Banlist Parser - by John Rockie - 21.08.2013, 01:40
Re: [PHP] SA-MP Website Banlist Parser - by BlonduX - 14.08.2014, 18:55
Re: [PHP] SA-MP Website Banlist Parser - by Don_Cage - 21.08.2014, 09:33

Forum Jump:


Users browsing this thread: 9 Guest(s)