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

why is the "Type"-Row always written in small letters? is there any way to change this?
Reply
#22

bump :<
Reply
#23

Update! Cleaned up the class, changed around some parameters and rewrote the documentation. Also added two new examples to the live example list.

Anyone who needs help with this can get into contact with me over MSN / PM, please do not expect spoon feeding though, I'm a busy person aswell.
Reply
#24

Quote:
Originally Posted by » ραωпsтαг «
An option to disable or enable the showing of IP's would be better. All these IP's could just get harvested for malicious use, which isn't good :P
It is possible to not show them though, just dont include #IP in your format string -
Reply
#25

Hey, I was trying to get it working but I failed.
Well, my samp.ban file is NOT on the same host as my website.
I defined everything in config.cfg, it does not say "Couldn't connect bla bla..".
It displays the tables but it does not show the contnt of samp.ban

I also made a cron

here's it: 1 * * * * /var/www/bpeterson/bans/cron.php - on the website's host

my samp.ban location: $this->local_file = "/home/samp/ofs/samp.ban";

Help please!

Thanks,
bpeerson
Reply
#26

If you edited the actual class, well - dont do it, redownload a fresh copy now.

for the Bans::cron() method, add in the directory of the samp.ban file relative to where your ftp account specified logs into. For example, if your ftp account's home directory is samp (from "/home/samp/ofs/samp.ban") on your remote server, than use Bans::cron("ofs/samp.ban")
Try running cron.php from your browser and post any errors here, aswell as your cron.php if its still not working.
Reply
#27

Im trying to change this up..

heres my code:

Код:
    public function parseBan() {
		$file = fopen('ban.log','r');
        $data = fread($file,filesize('ban.log'));
        $pieces = explode("/", $file);
        $USER = $pieces[1];
        $USERBY = $pieces[3];
        $USER = $pieces[5];
        fclose($file);
	}
now im trying to make it so it splits it up by where the / is placed..

Код:
[ ! ] /noob852/ has been banned by/ the server/ for /$$$ hack/ !
But the table is blank
Reply
#28

Awesome im using this
Reply
#29

Can anyone tell me exactly what to change?
Reply
#30

Hello, it is not working...
I am noob....((
Must i edit only config.cfg?
Must i write ip with port, or not?
For example...:
my ip is 188.34.25.231
port of my ftp server is 21
login: aaaa
password(for example of course): bbbb
what should i edit for it?
Than i try to do it, there are: tabel and:


Warning: fopen(samp.ban) [function.fopen]: failed to open stream: No such file or directory in C:\sites\home\localhost\www\banlist\Bans.php on line 59

Warning: filesize() [function.filesize]: stat failed for samp.ban in C:\sites\home\localhost\www\banlist\Bans.php on line 60

Warning: fread(): supplied argument is not a valid stream resource in C:\sites\home\localhost\www\banlist\Bans.php on line 60

Warning: fclose(): supplied argument is not a valid stream resource in C:\sites\home\localhost\www\banlist\Bans.php on line 61

help me please)))...
Reply
#31

Quote:
Originally Posted by BASITJALIL
Посмотреть сообщение
Its nice
Can we remove a ban from Website?
Yes

Please add new link!
Reply
#32

Sorry, please reload it
Reply
#33

new link please
Reply
#34

Please add new link
Reply
#35

Please new link
Reply
#36

Please update
Reply
#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
#38

Anyone has this files anymore to provide me a link?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)