SA-MP Forums Archive
PHP Ban list ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PHP Ban list ? (/showthread.php?tid=525731)



PHP Ban list ? - rockhopper - 13.07.2014

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 ?


Re: PHP Ban list ? - Clad - 13.07.2014

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


Re: PHP Ban list ? - rickisme - 13.07.2014

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/>";
}
?>



Re: PHP Ban list ? - NewerthRoleplay - 13.07.2014

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.


Re: PHP Ban list ? - rickisme - 13.07.2014

Are you sure about that ?

http://php.net/manual/en/function.file.php @@


Re: PHP Ban list ? - NewerthRoleplay - 13.07.2014

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.


Re: PHP Ban list ? - rockhopper - 15.07.2014

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