[Duda] Poner los baneados en la web
#1

Hola.
їGente como puedo poner los baneados en mi web? ( Mire el otro post y no pude hacerlo )
Se los agradeseria de corazon que me ayuden por favor
Gracias a todos
Reply
#2

Si tienes la web, copia el samp.ban y pegalo n la web, facil, rбpido y eficaz
Reply
#3

lo abris con Fopen, lo lees, y lo volcas a un textbox.
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=186154

En este mismo foro, pasando una hoja

Posibles soluciones
PHP код:
<?php
    
//GetBans
    //October 11th/2009
    //Retrieves the samp banlist from your server and echos it back in a neat fashion.
    
    
$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) or die("failed");
    
ftp_close($con);
    
    
$file fopen("ban.txt""r");
    
$bans fread($filefilesize("ban.txt"));
    
fclose($file);
    
    echo 
nl2br($bans);

?>
PHP код:
<?php 
    
//GetBans 
    //October 11th/2009 
    //Retrieves the samp banlist from your server and echos it back in a neat fashion. 
     
    
$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"samp.ban"$banfileFTP_ASCII) or die("No se puede obtener el archivo"); 
    
ftp_close($con); 
    
rename("$banfile","samp.txt"); 

    
$file fopen("samp.txt""r"); 
    
$bans fread($filefilesize("samp.txt")); 
    
fclose($file); 
     
    echo 
nl2br($bans); 

?>
PHP код:
<?php 
    
//GetBans 
    //October 11th/2009 
    //Retrieves the samp banlist from your server and echos it back in a neat fashion. 
     
    
$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); 
    if (
ftp_get($con"samp.ban"$banfileFTP_BINARY)) { 
    echo 
"Se ha guardado satisfactoriamente en $local_file\n"
} else { 
    echo 
"Ha habido un problema\n"


    
ftp_close($con); 
    
rename("$banfile","samp.txt"); 

    
$file fopen("samp.txt""r"); 
    
$bans fread($filefilesize("samp.txt")); 
    
fclose($file); 
     
    echo 
nl2br($bans); 

?>
Debes rellenar los datos FTP de tu host de SAMP, aсadirlo en el archivo web que desees y rezar para que funione
Reply
#5

Quote:
Originally Posted by SuperMarioRol
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=186154

En este mismo foro, pasando una hoja

Posibles soluciones
PHP код:
<?php
    
//GetBans
    //October 11th/2009
    //Retrieves the samp banlist from your server and echos it back in a neat fashion.
    
    
$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) or die("failed");
    
ftp_close($con);
    
    
$file fopen("ban.txt""r");
    
$bans fread($filefilesize("ban.txt"));
    
fclose($file);
    
    echo 
nl2br($bans);
?>
PHP код:
<?php 
    
//GetBans 
    //October 11th/2009 
    //Retrieves the samp banlist from your server and echos it back in a neat fashion. 
     
    
$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"samp.ban"$banfileFTP_ASCII) or die("No se puede obtener el archivo"); 
    
ftp_close($con); 
    
rename("$banfile","samp.txt"); 
    
$file fopen("samp.txt""r"); 
    
$bans fread($filefilesize("samp.txt")); 
    
fclose($file); 
     
    echo 
nl2br($bans); 
?>
PHP код:
<?php 
    
//GetBans 
    //October 11th/2009 
    //Retrieves the samp banlist from your server and echos it back in a neat fashion. 
     
    
$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); 
    if (
ftp_get($con"samp.ban"$banfileFTP_BINARY)) { 
    echo 
"Se ha guardado satisfactoriamente en $local_file\n"
} else { 
    echo 
"Ha habido un problema\n"

    
ftp_close($con); 
    
rename("$banfile","samp.txt"); 
    
$file fopen("samp.txt""r"); 
    
$bans fread($filefilesize("samp.txt")); 
    
fclose($file); 
     
    echo 
nl2br($bans); 
?>
Debes rellenar los datos FTP de tu host de SAMP, aсadirlo en el archivo web que desees y rezar para que funione
Voy a hacer una correccion

Proba esos, o este.

PHP код:
<?php 
    
//GetBans 
    //October 11th/2009 
    //Retrieves the samp banlist from your server and echos it back in a neat fashion. 
     
    
$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); 
    if (
ftp_get($con"samp.ban"$banfileFTP_BINARY)) { 
    echo 
"Se ha guardado satisfactoriamente en $local_file\n"
} else { 
    echo 
"Ha habido un problema\n"

    
ftp_close($con); 
    
rename($banfile,"samp.txt"); 
    
$file fopen("samp.txt""r"); 
    
$bans fread($filefilesize("samp.txt")); 
    
fclose($file); 
     
    echo 
nl2br($bans); 
?>
Lo unico que note que estaba mal, es que la variable NO ERA USADA COMO VARIABLE si no como tipo string (cadenas de caracteres). Por lo que era imposible accesar al archivo, ya que intentaba buscar el archivo $banfile en vez de su contenido dentro de la variable.
Reply
#6

Ponselo en el post del que tenia dudas
Reply
#7

Ninguno me funciona
Reply
#8

Mira ver si te sirve de algo este post..

https://sampforum.blast.hk/showthread.php?tid=111636
Reply
#9

ami tampoco me funciona ninguna manera sigo investigando....... T_T
Reply
#10

mбs simple pienso yo que es hacer un sistema de baneos via mysql como el que usamos en LU-RP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)