PHP Ban list ?
#1

Im using SMF Forums :P I just wanted to know is it possible to display samp.ban in My forums ? like it would show The samp.ban File there ?
Reply
#2

I'm not sure if you can put it, You mean players will see it or download it ? :/
Reply
#3

change C:\samp03z_svr_R1_win32 to your path
PHP код:
<?php 
function getcontent($path)
{
    
set_include_path(get_include_path() . PATH_SEPARATOR $path);
    return 
file("samp.ban"true);
}
$lines getcontent("C:\samp03z_svr_R1_win32");
foreach(
$lines  as $line ){
echo 
$line."<br/>";
}
?>
Reply
#4

Quote:
Originally Posted by rickisme
Посмотреть сообщение
change C:\samp03z_svr_R1_win32 to your path
PHP код:
<?php 
function getcontent($path)
{
    
set_include_path(get_include_path() . PATH_SEPARATOR $path);
    return 
file("samp.ban"true);
}
$lines getcontent("C:\samp03z_svr_R1_win32");
foreach(
$lines  as $line ){
echo 
$line."<br/>";
}
?>
That would only work on the same windows server that the server is on, and also assuming the webhost is running on windows, which a lot don't.

Anyway, you could use a similar method from your last post where you were using an ftp:// link to get the content of the file.
Reply
#5

Are you sure about that ?

http://php.net/manual/en/function.file.php @@
Reply
#6

Quote:
Originally Posted by rickisme
Посмотреть сообщение
Are you sure about that ?

http://php.net/manual/en/function.file.php @@
I was talking about your specific example where instead you used a local directory.
Reply
#7

I dont understand How Can i do it And Players CAn See it .. ? Not download It Should Like show .ban file ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)